diff --git a/lib/aws-xray-sdk/facets/rails/railtie.rb b/lib/aws-xray-sdk/facets/rails/railtie.rb index 89905fd..499bc58 100644 --- a/lib/aws-xray-sdk/facets/rails/railtie.rb +++ b/lib/aws-xray-sdk/facets/rails/railtie.rb @@ -7,7 +7,7 @@ class Railtie < ::Rails::Railtie RAILS_OPTIONS = %I[active_record].freeze initializer("aws-xray-sdk.rack_middleware") do |app| - app.middleware.insert 0, Rack::Middleware + app.middleware.insert 0, XRay::Rack::Middleware app.middleware.use XRay::Rails::ExceptionMiddleware end