class ScoutApm::RequestManager

Public Class Methods

create() click to toggle source

Create a new TrackedRequest object for this thread XXX: Figure out who is in charge of creating a `FakeStore` - previously was here

# File lib/scout_apm/request_manager.rb, line 23
def self.create
  agent_context = ScoutApm::Agent.instance.context
  store = agent_context.store
  Thread.current[:scout_request] = TrackedRequest.new(agent_context, store)
end
find() click to toggle source

Get the current Thread local, and detecting, and not returning a stale request

# File lib/scout_apm/request_manager.rb, line 11
def self.find
  req = Thread.current[:scout_request]

  if req && (req.stopping? || req.recorded?)
    nil
  else
    req
  end
end
lookup() click to toggle source
# File lib/scout_apm/request_manager.rb, line 6
def self.lookup
  find || create
end