lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-excon-0.21.2 vs lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-excon-0.21.3
- old
+ new
@@ -76,10 +76,10 @@
return span if span.end_timestamp
if datum.key?(:response)
response = datum[:response]
span.set_attribute('http.status_code', response[:status])
- span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(response[:status].to_i)
+ span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response[:status].to_i)
end
span.status = OpenTelemetry::Trace::Status.error("Request has failed: #{datum[:error]}") if datum.key?(:error)
span.finish