class HeimdallApm::TransactionManager
Handles the thread-local variable holding the current tracked transaction, populating it the first time it is accessed.
Public Class Methods
create()
click to toggle source
# File lib/heimdall_apm/transaction_manager.rb, line 22 def self.create context = Agent.instance.context Thread.current[:heimdall_request] = ::HeimdallApm::TrackedTransaction.new(context) end
current()
click to toggle source
# File lib/heimdall_apm/transaction_manager.rb, line 8 def self.current find || create end
find()
click to toggle source
# File lib/heimdall_apm/transaction_manager.rb, line 12 def self.find req = Thread.current[:heimdall_request] if !req || req.stopped? nil else req end end