lib/opentelemetry/instrumentation/sinatra/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-sinatra-0.18.0 vs lib/opentelemetry/instrumentation/sinatra/middlewares/tracer_middleware.rb in opentelemetry-instrumentation-sinatra-0.19.0

- 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.http_to_status(status) + span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status.to_i) end end end end end