Class: Dionysus::Producer::Outbox::DatadogTracer

Inherits:
Object
  • Object
show all
Defined in:
lib/dionysus/producer/outbox/datadog_tracer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.service_nameObject



7
8
9
# File 'lib/dionysus/producer/outbox/datadog_tracer.rb', line 7

def self.service_name
  SERVICE_NAME
end

Instance Method Details

#trace(event_name, topic) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/dionysus/producer/outbox/datadog_tracer.rb', line 11

def trace(event_name, topic)
  tracer.trace(event_name, span_type: "worker", service: self.class.service_name, on_error: error_handler) do |span|
    span.set_tag("topic", topic)

    yield
  end
end