Sha256: baf242163c853637a293974d6e3bbbad359d26a0c49b4126151434397fe448ef

Contents?: true

Size: 1.04 KB

Versions: 21

Compression:

Stored size: 1.04 KB

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 'bunny/instrumentation'
require_relative 'bunny/chain'
require_relative 'bunny/prepend'

DependencyDetection.defer do
  named :bunny

  depends_on do
    defined?(Bunny)
  end

  executes do
    NewRelic::Agent.logger.info('Installing Bunny instrumentation')
    require 'new_relic/agent/distributed_tracing/cross_app_tracing'
    require 'new_relic/agent/messaging'
    require 'new_relic/agent/transaction/message_broker_segment'
  end

  executes do
    if use_prepend?
      prepend_instrument Bunny::Exchange, NewRelic::Agent::Instrumentation::Bunny::Prepend::Exchange
      prepend_instrument Bunny::Queue, NewRelic::Agent::Instrumentation::Bunny::Prepend::Queue
      prepend_instrument Bunny::Consumer, NewRelic::Agent::Instrumentation::Bunny::Prepend::Consumer
    else
      chain_instrument NewRelic::Agent::Instrumentation::Bunny::Chain
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.12.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.11.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.10.2 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.10.1 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.10.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.9.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.8.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.7.1 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.7.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.6.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.5.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.4.2 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.4.1 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.4.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.3.1 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.3.0 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.2.2 lib/new_relic/agent/instrumentation/bunny.rb
newrelic_rpm-9.2.1 lib/new_relic/agent/instrumentation/bunny.rb