Sha256: 1eaa0cd3a97291106190b30bb11988cf34f645da4bdd1b8f4fd040b3d8fddf2a

Contents?: true

Size: 774 Bytes

Versions: 55

Compression:

Stored size: 774 Bytes

Contents

# ActiveMerchant Instrumentation.

if defined? ActiveMerchant

  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

Version data entries

55 entries across 55 versions & 5 rubygems

Version Path
newrelic_rpm-2.13.4.rum6 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.4.rum5 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.4.rum4 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.5.beta4 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.5.beta3 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.5.beta2 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.5.beta1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.4.eum3 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.4.eum2 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.4.eum1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.4 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.3 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.3.beta lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.2 lib/new_relic/agent/instrumentation/active_merchant.rb
honkster-newrelic_rpm-2.13.1 lib/new_relic/agent/instrumentation/active_merchant.rb
onyx_newrelic_rpm-2.12.5 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.1 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.0.beta5 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.0.beta4 lib/new_relic/agent/instrumentation/active_merchant.rb
newrelic_rpm-2.13.0.beta3 lib/new_relic/agent/instrumentation/active_merchant.rb