Sha256: eca8b60b8ff2232d4ab0f58e1b001fb69c7ab5cdb028fc85eafe341551cf322a

Contents?: true

Size: 841 Bytes

Versions: 4

Compression:

Stored size: 841 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
    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

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-9.0.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.16.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.15.0 lib/new_relic/agent/instrumentation/httprb.rb
newrelic_rpm-8.14.0 lib/new_relic/agent/instrumentation/httprb.rb