Skip to content

NewRelic support for Doorkeeper::TokensController

soul-rebel edited this page Oct 7, 2013 · 3 revisions

By default, /oauth/token requests do not appear in NewRelic.

In order to enable them, add bellow to lib/doorkeeper/newrelic.rb

Doorkeeper::TokensController.class_eval do
  include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
  add_transaction_tracer :create
end

Append this line to config/initializers/doorkeeper.rb

require_relative '../../lib/doorkeeper/newrelic'

After server restart, requests to /oauth/token will appear in NewRelic.

Clone this wiki locally