lib/opentelemetry/instrumentation/http/patches/client.rb in opentelemetry-instrumentation-http-0.23.1 vs lib/opentelemetry/instrumentation/http/patches/client.rb in opentelemetry-instrumentation-http-0.23.2
- old
+ new
@@ -41,10 +41,10 @@
def annotate_span_with_response!(span, response)
return unless response&.status
status_code = response.status.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 create_request_span_name(request_method, request_path)
if (implementation = config[:span_name_formatter])
updated_span_name = implementation.call(request_method, request_path)