lib/opentelemetry/instrumentation/ethon/patches/easy.rb in opentelemetry-instrumentation-ethon-0.21.2 vs lib/opentelemetry/instrumentation/ethon/patches/easy.rb in opentelemetry-instrumentation-ethon-0.21.3

- old
+ new

@@ -40,10 +40,10 @@ return_code = response_options[:return_code] message = return_code ? ::Ethon::Curl.easy_strerror(return_code) : 'unknown reason' @otel_span.status = OpenTelemetry::Trace::Status.error("Request has failed: #{message}") else @otel_span.set_attribute('http.status_code', response_code) - @otel_span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(response_code.to_i) + @otel_span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response_code.to_i) end ensure @otel_span&.finish @otel_span = nil end