From d580607510cdfcd947a4f359ce40e49a7fd8a63b Mon Sep 17 00:00:00 2001 From: Robb Kidd Date: Fri, 13 Dec 2024 03:21:38 -0500 Subject: [PATCH] don't start OTel traces with Redis spans (#33090) --- config/initializers/opentelemetry.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/initializers/opentelemetry.rb b/config/initializers/opentelemetry.rb index a40cd4e4c5..90217139a8 100644 --- a/config/initializers/opentelemetry.rb +++ b/config/initializers/opentelemetry.rb @@ -54,6 +54,9 @@ if ENV.keys.any? { |name| name.match?(/OTEL_.*_ENDPOINT/) } '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 }, + 'OpenTelemetry::Instrumentation::Redis' => { + trace_root_spans: false, # don't start traces with Redis spans + }, }) prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon')