lib/opentelemetry/instrumentation/sinatra/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-sinatra-0.19.3 vs lib/opentelemetry/instrumentation/sinatra/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-sinatra-0.19.4
- old
+ new
@@ -41,10 +41,10 @@
status, _headers, _response_body = resp
span.set_attribute('http.status_code', status)
span.set_attribute('http.route', env['sinatra.route'].split.last) if env['sinatra.route']
span.name = env['sinatra.route'] if env['sinatra.route']
- 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)
end
end
end
end
end