Module: NewRelic::Agent::Instrumentation::HTTPrb::Chain

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

Class Method Summary collapse

Class Method Details

.instrument!Object



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

def self.instrument!
  ::HTTP::Client.class_eval do
    include NewRelic::Agent::Instrumentation::HTTPrb

    def perform_with_newrelic_trace(request, options)
      with_tracing(request) { perform_without_newrelic_trace(request, options) }
    end

    alias perform_without_newrelic_trace perform
    alias perform perform_with_newrelic_trace
  end
end