Class: RailsTransactionalOutbox::Tracers::DatadogTracer

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_transactional_outbox/tracers/datadog_tracer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.service_nameObject



9
10
11
# File 'lib/rails_transactional_outbox/tracers/datadog_tracer.rb', line 9

def self.service_name
  SERVICE_NAME
end

Instance Method Details

#trace(event_name) ⇒ Object



13
14
15
16
17
18
# File 'lib/rails_transactional_outbox/tracers/datadog_tracer.rb', line 13

def trace(event_name)
  tracer.trace(event_name, span_type: "worker", service: self.class.service_name,
    on_error: error_handler) do |_span|
    yield
  end
end