lib/ddtrace/contrib/rails/railtie.rb in ddtrace-0.11.4 vs lib/ddtrace/contrib/rails/railtie.rb in ddtrace-0.12.0.beta1

- old
+ new

@@ -4,13 +4,10 @@ module Datadog # Railtie class initializes class Railtie < Rails::Railtie config.app_middleware.insert_before(0, Datadog::Contrib::Rack::TraceMiddleware) - # Insert right after Rails exception handling middleware, because if it's before, - # it catches and swallows the error. If it's too far after, custom middleware can find itself - # between, and raise exceptions that don't end up getting tagged on the request properly (e.g lost stack trace.) - config.app_middleware.insert_after(ActionDispatch::ShowExceptions, Datadog::Contrib::Rails::ExceptionMiddleware) + config.app_middleware.use(Datadog::Contrib::Rails::ExceptionMiddleware) config.after_initialize do Datadog::Contrib::Rails::Framework.setup Datadog::Contrib::Rails::ActionController.instrument Datadog::Contrib::Rails::ActionView.instrument