Class: HeimdallApm::ActionController::Subscriber
- Inherits:
-
Object
- Object
- HeimdallApm::ActionController::Subscriber
- Defined in:
- lib/heimdall_apm/instruments/action_controller.rb
Instance Method Summary collapse
Instance Method Details
#finish(name, id, payload) ⇒ Object
13 14 15 16 |
# File 'lib/heimdall_apm/instruments/action_controller.rb', line 13 def finish(name, id, payload) txn = ::HeimdallApm::TransactionManager.current txn.stop_segment end |
#start(name, id, payload) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/heimdall_apm/instruments/action_controller.rb', line 4 def start(name, id, payload) txn = ::HeimdallApm::TransactionManager.current scope = -"#{payload[:controller]}##{payload[:action]}" segment = ::HeimdallApm::Segment.new('Controller'.freeze, scope) txn.scope = scope unless txn.scope txn.start_segment(segment) end |