lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.23.4 vs lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.23.5
- old
+ new
@@ -148,10 +148,10 @@
"HTTP #{env['REQUEST_METHOD']}"
end
end
def set_attributes_after_request(span, status, headers, _response)
- span.status = OpenTelemetry::Trace::Status.error unless (100..499).include?(status.to_i)
+ span.status = OpenTelemetry::Trace::Status.error unless (100..499).cover?(status.to_i)
span.set_attribute('http.status_code', status)
# NOTE: if data is available, it would be good to do this:
# set_attribute('http.route', ...
# e.g., "/users/:userID?