Sha256: 3473c17a866c0e257ad3abb84ea7f3f5076e265771d3b196bd7dbb2831206f9a

Contents?: true

Size: 1 KB

Versions: 13

Compression:

Stored size: 1 KB

Contents

# encoding: utf-8

module OneApm
  module Agent
    module Instrumentation
      module Rails4
        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, \
                :custom_params => filtered_params)
          end
        end
      end
    end
  end
end

LibraryDetection.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
    OneApm::Manager.logger.info "Installing Rails #{::Rails::VERSION::MAJOR} Error instrumentation"
  end

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
oneapm_rpm-1.4.2 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.4.1 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.4.0 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.7 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.6 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.5 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.4 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.3 lib/one_apm/inst/rails4/errors.rb
oneapm_rpm-1.3.3.rc1 lib/one_apm/inst/rails4/errors.rb