Sha256: 9cf2cab68ba86e5b022ed83b683c9681f0977c4ae1e8e7c9f814a5a99c459486

Contents?: true

Size: 1.02 KB

Versions: 39

Compression:

Stored size: 1.02 KB

Contents

# encoding: utf-8

module OneApm
  module Agent
    module Instrumentation
      module Rails3
        module Errors
          def oneapm_notice_error(exception, custom_params = {})
            filtered_params = (respond_to? :filter_parameters) ? filter_parameters(params) : params
            filtered_params.merge!(custom_params)
            OneApm::Transaction.notice_error( \
                exception, \
                :request => request, \
                :metric => oneapm_metric_path, \
                :custom_params => filtered_params)
          end
        end
      end
    end
  end
end

LibraryDetection.defer do
  @name = :rails3_error

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

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

  executes do
    OneApm::Manager.logger.info 'Installing Rails 3 Error instrumentation'
  end

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

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
oneapm_rpm-1.4.2 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.4.1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.4.0 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.7 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.6 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.5 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.4 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.3 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.3.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.2 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.2.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.1.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.0 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.3.0.rc1 lib/one_apm/inst/rails3/errors.rb
oneapm_rpm-1.2.9 lib/one_apm/inst/rails3/errors.rb