Sha256: 3b0f8fed947b5fd4ae09d15df36dfde362cbf99ff0cbd5b125860b394bdb4873

Contents?: true

Size: 1.13 KB

Versions: 34

Compression:

Stored size: 1.13 KB

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

module NewRelic
  module Agent
    module Instrumentation
      module Rails4
        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::Transaction.notice_error( \
                exception, \
                :request => request, \
                :custom_params => filtered_params)
          end
        end
      end
    end
  end
end

DependencyDetection.defer do
  @name = :rails4_error

  depends_on do
    defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 4
  end

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

  executes do
    ::NewRelic::Agent.logger.info 'Installing Rails4 Error instrumentation'
  end

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

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
newrelic_rpm-3.9.0.229 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.8.1.221 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.8.0.218 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.3.204 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.3.199 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.2.195 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.2.192 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.2.190.beta lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.1.188 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.1.182 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.1.180 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.0.177 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.7.0.174.beta lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.6.9.171 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.6.8.168 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.6.8.164 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.6.7.159 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.6.7.159.beta lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.6.7.152 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.6.6.147 lib/new_relic/agent/instrumentation/rails4/errors.rb