Class: Hermes::Tracers::Datadog
- Inherits:
-
Object
- Object
- Hermes::Tracers::Datadog
- Defined in:
- lib/hermes/tracers/datadog.rb
Instance Method Summary collapse
- #handle(message) ⇒ Object
-
#initialize(klass) ⇒ Datadog
constructor
A new instance of Datadog.
Constructor Details
#initialize(klass) ⇒ Datadog
Returns a new instance of Datadog.
9 10 11 |
# File 'lib/hermes/tracers/datadog.rb', line 9 def initialize(klass) @klass = klass end |
Instance Method Details
#handle(message) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hermes/tracers/datadog.rb', line 13 def handle() tracer = ::Datadog.respond_to?(:tracer) ? ::Datadog.tracer : "Datadog::Tracing".safe_constantize tracer.trace( klass.class.name || klass.class.to_s, service: "hermes", span_type: "rabbitmq" ) do klass.process() end end |