lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-faraday-0.14.0 vs lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-faraday-0.15.0
- old
+ new
@@ -48,10 +48,10 @@
Faraday::Instrumentation.instance.tracer
end
def trace_response(span, response)
span.set_attribute('http.status_code', response.status)
- span.set_attribute('http.status_text', response.reason_phrase)
+ span.set_attribute('http.status_text', response.reason_phrase) if response.reason_phrase
span.status = OpenTelemetry::Trace::Status.http_to_status(
response.status
)
end
end