lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb in opentelemetry-instrumentation-sidekiq-0.21.0 vs lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb in opentelemetry-instrumentation-sidekiq-0.21.1
- old
+ new
@@ -18,13 +18,13 @@
'messaging.sidekiq.job_class' => job['wrapped']&.to_s || job['class'],
'messaging.message_id' => job['jid'],
'messaging.destination' => job['queue'],
'messaging.destination_kind' => 'queue'
}
- attributes['peer.service'] = config[:peer_service] if config[:peer_service]
+ attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
- span_name = case config[:span_naming]
+ span_name = case instrumentation_config[:span_naming]
when :job_class then "#{job['wrapped']&.to_s || job['class']} send"
else "#{job['queue']} send"
end
tracer.in_span(span_name, attributes: attributes, kind: :producer) do |span|
@@ -34,10 +34,10 @@
end
end
private
- def config
+ def instrumentation_config
Sidekiq::Instrumentation.instance.config
end
def tracer
Sidekiq::Instrumentation.instance.tracer