lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.20.1 vs lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-rack-0.20.2

- old
+ new

@@ -149,10 +149,10 @@ "HTTP #{env['REQUEST_METHOD']}" end end def set_attributes_after_request(span, status, headers, _response) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status.to_i) + span.status = OpenTelemetry::Trace::Status.error unless (100..499).include?(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?