Sha256: dfd040f9981da5f83a6710dc5d43927e987e2244be5c620b05fdfa4055ba43f1

Contents?: true

Size: 971 Bytes

Versions: 49

Compression:

Stored size: 971 Bytes

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.agent.error_collector.notice_error(exception, request, newrelic_metric_path, 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

49 entries across 49 versions & 4 rubygems

Version Path
newrelic_rpm-3.5.0.1 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.1.alpha lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.5.0 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.2.1 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.2 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.2.beta1 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.1 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.1.beta1 lib/new_relic/agent/instrumentation/rails3/errors.rb
ghazel-newrelic_rpm-3.4.0.2 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.0.1 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.0 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.0.beta2 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.3.5 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.3.5.beta1 lib/new_relic/agent/instrumentation/rails3/errors.rb
newrelic_rpm-3.4.0.beta1 lib/new_relic/agent/instrumentation/rails3/errors.rb
dolores_rpm-3.3.4.8 lib/new_relic/agent/instrumentation/rails3/errors.rb
dolores_rpm-3.3.4.7 lib/new_relic/agent/instrumentation/rails3/errors.rb
dolores_rpm-3.3.4.6 lib/new_relic/agent/instrumentation/rails3/errors.rb
dolores_rpm-3.3.4.5 lib/new_relic/agent/instrumentation/rails3/errors.rb
dolores_rpm-3.3.4.4 lib/new_relic/agent/instrumentation/rails3/errors.rb