module NewRelic::Agent::Instrumentation::AsyncHttp::Chain

Public Class Methods

instrument!() click to toggle source
# File lib/new_relic/agent/instrumentation/async_http/chain.rb, line 9
def self.instrument!
  ::Async::HTTP::Internet.class_eval do
    include NewRelic::Agent::Instrumentation::AsyncHttp

    alias_method(:call_without_new_relic, :call)

    def call(method, url, headers = nil, body = nil)
      call_with_new_relic(method, url, headers, body) do |hdr|
        call_without_new_relic(method, url, hdr, body)
      end
    end
  end
end

Public Instance Methods

call(method, url, headers = nil, body = nil) click to toggle source
# File lib/new_relic/agent/instrumentation/async_http/chain.rb, line 15
def call(method, url, headers = nil, body = nil)
  call_with_new_relic(method, url, headers, body) do |hdr|
    call_without_new_relic(method, url, hdr, body)
  end
end