Sha256: 4647cbec894c4f0645e9b226fbc8c7f0f64a903c26f720c997a1051eeec41cfa

Contents?: true

Size: 838 Bytes

Versions: 18

Compression:

Stored size: 838 Bytes

Contents

DependencyDetection.defer do
  depends_on do
    defined?(ActiveMerchant)
  end

  executes do
    ActiveMerchant::Billing::Gateway.implementations.each do |gateway|
      gateway.class_eval do
        implemented_methods = public_instance_methods(false)
        gateway_name = self.name.split('::').last
        [:authorize, :purchase, :credit, :void, :capture, :recurring].each do |operation|
          if implemented_methods.include?(operation.to_s)
            add_method_tracer operation, "ActiveMerchant/gateway/#{gateway_name}/#{operation}", :scoped_metric_only => true
            add_method_tracer operation, "ActiveMerchant/gateway/#{gateway_name}", :push_scope => false
            add_method_tracer operation, "ActiveMerchant/operation/#{operation}", :push_scope => false
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
ghazel-newrelic_rpm-3.1.0.1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0.beta5 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0.beta4 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0.djlogging2 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0.djlogging lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0.beta3 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0.beta2 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.0.1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.1.0.beta1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.0.0 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.0.0.beta2 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-3.0.0.beta1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.14.1.logging1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.14.1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.14.0 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.6.beta2 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.6.beta1 lib/new_relic/agent/instrumentation/active_merchant.rb