lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.24.6 vs lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.25.0

- old
+ new

@@ -150,10 +150,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).cover?(status.to_i) + span.status = OpenTelemetry::Trace::Status.error if (500..599).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?