From 22813dbc6e26dc261dae6677e50b812b7f8f70ed Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 19 Dec 2024 11:44:44 +0100 Subject: [PATCH] Fix `/health` endpoint when OTEL is configured (#33362) --- config/initializers/opentelemetry.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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