diff --git a/adapters/sinatra/lib/opentelemetry/adapters/sinatra/middlewares/tracer_middleware.rb b/adapters/sinatra/lib/opentelemetry/adapters/sinatra/middlewares/tracer_middleware.rb index ae47fbe06..d66c0b759 100644 --- a/adapters/sinatra/lib/opentelemetry/adapters/sinatra/middlewares/tracer_middleware.rb +++ b/adapters/sinatra/lib/opentelemetry/adapters/sinatra/middlewares/tracer_middleware.rb @@ -43,7 +43,7 @@ def trace_response(span, env, resp) status, _headers, _response_body = resp span.set_attribute('http.status_code', status) - span.set_attribute('http.status_text', Rack::Utils::HTTP_STATUS_CODES[status]) + span.set_attribute('http.status_text', ::Rack::Utils::HTTP_STATUS_CODES[status]) span.set_attribute('http.route', env['sinatra.route'].split.last) span.status = OpenTelemetry::Trace::Status.http_to_status(status) end