Class: AppsignalExtensions::Middleware::Close

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/appsignal_extensions/middleware.rb

Overview

Appsignal::Transaction has no #close method, you have to use a global function call instead. We wrap it with a simple proxy that provides close

Instance Method Summary collapse

Instance Method Details

#closeObject

Closes the current Appsignal transaction



14
15
16
# File 'lib/appsignal_extensions/middleware.rb', line 14

def close
  Appsignal::Transaction.complete_current! if Appsignal.active?
end