Class: Gruf::Instrumentation::OutputMetadataTimer
- Defined in:
- lib/gruf/instrumentation/output_metadata_timer.rb
Overview
Appends the timer metadata to the active call output metadata
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(rc) ⇒ Hash
Handle the instrumented response.
Methods inherited from Base
#initialize, #method_key, #outer_around, #service_key, #setup, #success?
Methods included from Loggable
Constructor Details
This class inherits a constructor from Gruf::Instrumentation::Base
Instance Method Details
#call(rc) ⇒ Hash
Handle the instrumented response. Note: this will only instrument timings of successful responses.
29 30 31 |
# File 'lib/gruf/instrumentation/output_metadata_timer.rb', line 29 def call(rc) rc.active_call..update( => rc.execution_time.to_s) end |