lib/opentelemetry/instrumentation/http_client/patches/client.rb in opentelemetry-instrumentation-http_client-0.22.2 vs lib/opentelemetry/instrumentation/http_client/patches/client.rb in opentelemetry-instrumentation-http_client-0.22.3
- old
+ new
@@ -40,10 +40,10 @@
return unless response&.status_code
status_code = response.status_code.to_i
span.set_attribute('http.status_code', status_code)
- span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status_code.to_i)
+ span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(status_code.to_i)
end
def tracer
HttpClient::Instrumentation.instance.tracer
end