Module: NewRelic::Agent::Instrumentation::Rake::Chain

Defined in:
lib/new_relic/agent/instrumentation/rake/chain.rb

Class Method Summary collapse

Class Method Details

.instrument!Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/new_relic/agent/instrumentation/rake/chain.rb', line 8

def self.instrument!
  ::Rake::Task.class_eval do
    include NewRelic::Agent::Instrumentation::Rake::Tracer
    alias_method(:invoke_without_newrelic, :invoke)

    def invoke(*args)
      invoke_with_newrelic_tracing(*args) { invoke_without_newrelic(*args) }
    end
  end
end