lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb in opentelemetry-instrumentation-sidekiq-0.16.0 vs lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb in opentelemetry-instrumentation-sidekiq-0.17.0

- old
+ new

@@ -10,10 +10,12 @@ module Patches # The Poller module contains instrumentation for the enqueue and wait methods module Poller def enqueue if config[:trace_poller_enqueue] - tracer.in_span('Sidekiq::Scheduled::Poller#enqueue') { super } + 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