Class: Hutch::Tracers::Opbeat
- Inherits:
-
Object
- Object
- Hutch::Tracers::Opbeat
- Defined in:
- lib/hutch/tracers/opbeat.rb
Overview
Tracer for Opbeat, which traces each message processed.
Constant Summary collapse
- KIND =
'messaging.hutch'.freeze
Instance Method Summary collapse
- #handle(message) ⇒ Object
-
#initialize(klass) ⇒ Opbeat
constructor
A new instance of Opbeat.
Constructor Details
#initialize(klass) ⇒ Opbeat
Returns a new instance of Opbeat.
10 11 12 |
# File 'lib/hutch/tracers/opbeat.rb', line 10 def initialize(klass) @klass = klass end |
Instance Method Details
#handle(message) ⇒ Object
15 16 17 18 19 |
# File 'lib/hutch/tracers/opbeat.rb', line 15 def handle() ::Opbeat.transaction(sig, KIND, extra: extra_from()) do @klass.process() end.done(true) end |