diff --git a/instrumentation/sinatra/lib/opentelemetry/instrumentation/sinatra/extensions/tracer_extension.rb b/instrumentation/sinatra/lib/opentelemetry/instrumentation/sinatra/extensions/tracer_extension.rb index c002463359..c14c6424d7 100644 --- a/instrumentation/sinatra/lib/opentelemetry/instrumentation/sinatra/extensions/tracer_extension.rb +++ b/instrumentation/sinatra/lib/opentelemetry/instrumentation/sinatra/extensions/tracer_extension.rb @@ -28,7 +28,7 @@ def render(_engine, data, *) end end end - app.use OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware + app.use(*OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.middleware_args) app.use Middlewares::TracerMiddleware end end