diff --git a/config/initializers/opentelemetry.rb b/config/initializers/opentelemetry.rb index 0a8d686f6c..2fb445ecf5 100644 --- a/config/initializers/opentelemetry.rb +++ b/config/initializers/opentelemetry.rb @@ -86,10 +86,7 @@ if ENV.keys.any? { |name| name.match?(/OTEL_.*_ENDPOINT/) } def call(env) span = OpenTelemetry::Trace.current_span - unless span.recording? - @app.call(env) - return - end + return @app.call(env) unless span.recording? span_id = span.context.hex_span_id trace_id = span.context.hex_trace_id