module OpenTelemetry::Instrumentation::Sidekiq::Patches::Poller
The Poller
module contains instrumentation for the enqueue and wait methods
Public Instance Methods
enqueue()
click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb, line 13 def enqueue if config[:trace_poller_enqueue] attributes = {} attributes['peer.service'] = config[:peer_service] if config[:peer_service] tracer.in_span('Sidekiq::Scheduled::Poller#enqueue', attributes: attributes) { super } else OpenTelemetry::Common::Utilities.untraced { super } end end
Private Instance Methods
config()
click to toggle source
# File lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb, line 37 def config Sidekiq::Instrumentation.instance.config end
tracer()
click to toggle source
# File lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb, line 33 def tracer Sidekiq::Instrumentation.instance.tracer end
wait()
click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb, line 25 def wait if config[:trace_poller_wait] tracer.in_span('Sidekiq::Scheduled::Poller#wait') { super } else OpenTelemetry::Common::Utilities.untraced { super } end end