Use the job class as span name for Sidekiq root spans (#30353)

This commit is contained in:
Renaud Chaput 2024-05-20 10:01:04 +02:00 committed by GitHub
parent 0ce22859a5
commit 9658d3e580
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,6 +51,9 @@ if ENV.keys.any? { |name| name.match?(/OTEL_.*_ENDPOINT/) }
use_rack_events: false, # instead of events, use middleware; allows for untraced_endpoints to ignore child spans
untraced_endpoints: ['/health'],
},
'OpenTelemetry::Instrumentation::Sidekiq' => {
span_naming: :job_class, # Use the job class as the span name, otherwise this is the queue name and not very helpful
},
})
prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon')