Sha256: 6b028e64b70e90458f150b28a5a58b3147ec7935a14483afe8d59f25df1bfca6

Contents?: true

Size: 759 Bytes

Versions: 7

Compression:

Stored size: 759 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.

module NewRelic::Agent::Instrumentation
  module HTTPClient
    module Chain
      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
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
newrelic_rpm-8.9.0 lib/new_relic/agent/instrumentation/httpclient/chain.rb
newrelic_rpm-8.8.0 lib/new_relic/agent/instrumentation/httpclient/chain.rb
newrelic_rpm-8.7.0 lib/new_relic/agent/instrumentation/httpclient/chain.rb
newrelic_rpm-8.6.0 lib/new_relic/agent/instrumentation/httpclient/chain.rb
newrelic_rpm-8.5.0 lib/new_relic/agent/instrumentation/httpclient/chain.rb
newrelic_rpm-8.4.0 lib/new_relic/agent/instrumentation/httpclient/chain.rb
newrelic_rpm-8.3.0 lib/new_relic/agent/instrumentation/httpclient/chain.rb