Fix `/health` endpoint when OTEL is configured (#33362)
parent
32184e3f04
commit
22813dbc6e
|
@ -86,10 +86,7 @@ if ENV.keys.any? { |name| name.match?(/OTEL_.*_ENDPOINT/) }
|
||||||
def call(env)
|
def call(env)
|
||||||
span = OpenTelemetry::Trace.current_span
|
span = OpenTelemetry::Trace.current_span
|
||||||
|
|
||||||
unless span.recording?
|
return @app.call(env) unless span.recording?
|
||||||
@app.call(env)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
span_id = span.context.hex_span_id
|
span_id = span.context.hex_span_id
|
||||||
trace_id = span.context.hex_trace_id
|
trace_id = span.context.hex_trace_id
|
||||||
|
|
Loading…
Reference in New Issue