Sha256: e433cd65e03d66d3851f3c003e0143c7aba868171046c00edafd2296492f84e0

Contents?: true

Size: 834 Bytes

Versions: 13

Compression:

Stored size: 834 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.

require_relative 'httprb/instrumentation'
require_relative 'httprb/chain'
require_relative 'httprb/prepend'

DependencyDetection.defer do
  named :httprb

  depends_on do
    defined?(HTTP) && defined?(HTTP::Client)
  end

  executes do
    ::NewRelic::Agent.logger.info "Installing http.rb Wrappers"
    require 'new_relic/agent/distributed_tracing/cross_app_tracing'
    require 'new_relic/agent/http_clients/http_rb_wrappers'
  end

  executes do
    if use_prepend?
      prepend_instrument HTTP::Client, ::NewRelic::Agent::Instrumentation::HTTPrb::Prepend
    else
      chain_instrument ::NewRelic::Agent::Instrumentation::HTTPrb::Chain
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
newrelic_rpm-8.9.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.8.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.7.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.6.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.5.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.4.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.3.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.2.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.1.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.0.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-7.2.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-7.1.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-7.0.0 lib/new_relic/agent/instrumentation/httprb.rb