lib/opentelemetry/instrumentation/sidekiq/patches/launcher.rb in opentelemetry-instrumentation-sidekiq-0.16.0 vs lib/opentelemetry/instrumentation/sidekiq/patches/launcher.rb in opentelemetry-instrumentation-sidekiq-0.17.0
- old
+ new
@@ -12,10 +12,12 @@
module Launcher
private
def ❤ # rubocop:disable Naming/MethodName
if config[:trace_launcher_heartbeat]
- tracer.in_span('Sidekiq::Launcher#heartbeat') { super }
+ attributes = {}
+ attributes['peer.service'] = config[:peer_service] if config[:peer_service]
+ tracer.in_span('Sidekiq::Launcher#heartbeat', attributes: attributes) { super }
else
OpenTelemetry::Common::Utilities.untraced { super }
end
end