Sha256: 2d7133a490b139b2c8b4c62a2a4e00893f9f3ab19a03f6ab80c90295027c0f15

Contents?: true

Size: 1.07 KB

Versions: 12

Compression:

Stored size: 1.07 KB

Contents

module NewRelic
  module Agent
    module Instrumentation
      module Rails3
        module Errors
          def newrelic_notice_error(exception, custom_params = {})
            filtered_params = (respond_to? :filter_parameters) ? filter_parameters(params) : params
            filtered_params.merge!(custom_params)
            NewRelic::Agent::Instrumentation::MetricFrame.notice_error( \
                exception, \
                :request => request, \
                :metric => newrelic_metric_path, \
                :custom_params => filtered_params)
          end
        end
      end
    end
  end
end

DependencyDetection.defer do
  @name = :rails3_error
  
  depends_on do
    defined?(::Rails) && ::Rails.respond_to?(:version) && ::Rails.version.to_i == 3
  end

  depends_on do
    defined?(ActionController) && defined?(ActionController::Base)
  end

  executes do
    NewRelic::Agent.logger.debug 'Installing Rails3 Error instrumentation'
  end

  executes do
    class ActionController::Base
      include NewRelic::Agent::Instrumentation::Rails3::Errors
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
newrelic_rpm-3.5.4.35.beta lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.4.34 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.4.33 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.4.31.beta lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.4.29.beta lib/new_relic/agent/instrumentation/rails3/errors.rb
ghazel-newrelic_rpm-3.5.4 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.3.25 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.3.24 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.2.17 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.1.14 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.1.14.beta lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.1.beta1 lib/new_relic/agent/instrumentation/rails3/errors.rb