Sha256: 0a7160076a93e3c463cbb2e39c2ce6ec4262b7db866c1f312c6db8227650ee81

Contents?: true

Size: 975 Bytes

Versions: 18

Compression:

Stored size: 975 Bytes

Contents

require 'ddtrace/contrib/rails/framework'
require 'ddtrace/contrib/rails/middlewares'
require 'ddtrace/contrib/rack/middlewares'

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.after_initialize do
      Datadog::Contrib::Rails::Framework.setup
      Datadog::Contrib::Rails::ActionController.instrument
      Datadog::Contrib::Rails::ActionView.instrument
      Datadog::Contrib::Rails::ActiveSupport.instrument
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ddtrace-0.15.0.internaltracinfeature1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.2.disableprotocolversion4 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.15.0 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.2.withoutpriorityparsing1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.2 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.15.0.beta1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.0 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.0.rc1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.13.2 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.0.beta2 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.14.0.beta1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.13.1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.13.0 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.12.1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.13.0.beta1 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.12.0 lib/ddtrace/contrib/rails/railtie.rb
ddtrace-0.12.0.rc1 lib/ddtrace/contrib/rails/railtie.rb