Class: AppMap::Rails::ActionHandler::HTTPServerResponse

Inherits:
Object
  • Object
show all
Includes:
ContextKey
Defined in:
lib/appmap/rails/action_handler.rb

Defined Under Namespace

Classes: Call

Instance Method Summary collapse

Methods included from ContextKey

#context_key

Instance Method Details

#call(_, started, finished, _, payload) ⇒ Object

(name, started, finished, unique_id, payload)



79
80
81
82
83
84
85
86
87
# File 'lib/appmap/rails/action_handler.rb', line 79

def call(_, started, finished, _, payload) # (name, started, finished, unique_id, payload)
  return unless Thread.current[context_key]

  context = Thread.current[context_key]
  Thread.current[context_key] = nil

  event = Call.new(__FILE__, __LINE__, payload, context.id, Time.now - context.start_time)
  AppMap.tracing.record_event(event)
end