Sha256: 3313f627e0965a45c12f8ef7f9fc243cc5db61f53f6bf687dd6056e187a53559

Contents?: true

Size: 778 Bytes

Versions: 4

Compression:

Stored size: 778 Bytes

Contents

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

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
    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

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-9.17.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-9.16.1 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-9.16.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-9.15.0 lib/new_relic/agent/instrumentation/httprb.rb