Class: Hutch::Tracers::Datadog

Inherits:
Object
  • Object
show all
Defined in:
lib/hutch/tracers/datadog.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Datadog

Returns a new instance of Datadog.



7
8
9
# File 'lib/hutch/tracers/datadog.rb', line 7

def initialize(klass)
  @klass = klass
end

Instance Method Details

#handle(message) ⇒ Object



11
12
13
14
15
# File 'lib/hutch/tracers/datadog.rb', line 11

def handle(message)
  ::Datadog::Tracing.trace(@klass.class.name, continue_from: nil, service: 'hutch', type: 'rabbitmq') do
    @klass.process(message)
  end
end