Sha256: c077ab7f64cbebdce4b97af4b11f08cc69780c1891ffe2b02f7c2ca6cc7dd2ef

Contents?: true

Size: 1.13 KB

Versions: 13

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 Rails 4 Error instrumentation'
  end

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
newrelic_rpm-3.11.2.286 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.11.1.284 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.11.0.283 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.10.0.279 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.9.275 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.8.273 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.7.266 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.6.257 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.5.251 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.4.245 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.3.241 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.2.239 lib/new_relic/agent/instrumentation/rails4/errors.rb
newrelic_rpm-3.9.1.236 lib/new_relic/agent/instrumentation/rails4/errors.rb