module NewRelic::Agent::Instrumentation::HTTPClient::Chain

Public Class Methods

instrument!() click to toggle source
# File lib/new_relic/agent/instrumentation/httpclient/chain.rb, line 8
def self.instrument!
  ::HTTPClient.class_eval do
    include NewRelic::Agent::Instrumentation::HTTPClient::Instrumentation

    def do_get_block_with_newrelic(req, proxy, conn, &block)
      with_tracing(req, conn) do
        do_get_block_without_newrelic(req, proxy, conn, &block)
      end
    end

    alias :do_get_block_without_newrelic :do_get_block
    alias :do_get_block :do_get_block_with_newrelic
  end
end

Public Instance Methods

do_get_block_with_newrelic(req, proxy, conn, &block) click to toggle source
# File lib/new_relic/agent/instrumentation/httpclient/chain.rb, line 12
def do_get_block_with_newrelic(req, proxy, conn, &block)
  with_tracing(req, conn) do
    do_get_block_without_newrelic(req, proxy, conn, &block)
  end
end