Module: OpenTelemetry::Instrumentation::Sidekiq::Patches::Poller

Defined in:
lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb

Overview

The Poller module contains instrumentation for the enqueue and wait methods

Instance Method Summary collapse

Instance Method Details

#enqueueObject



13
14
15
16
17
18
19
20
21
# File 'lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb', line 13

def enqueue
  if instrumentation_config[:trace_poller_enqueue]
    attributes = {}
    attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
    tracer.in_span('Sidekiq::Scheduled::Poller#enqueue', attributes: attributes) { super }
  else
    OpenTelemetry::Common::Utilities.untraced { super }
  end
end