class Airbrake::Sneakers::ErrorReporter

Provides integration with Sneakers.

@see github.com/jondot/sneakers @since v7.2.0

Constants

IGNORED_KEYS

@return [Array<Symbol>] ignored keys values of which raise

SystemStackError when `as_json` is called on them

@see github.com/airbrake/airbrake/issues/850

Public Instance Methods

call(exception, worker = nil, **context) click to toggle source
# File lib/airbrake/sneakers.rb, line 13
def call(exception, worker = nil, **context)
  Airbrake.notify(exception, filter_context(context)) do |notice|
    notice[:context][:component] = 'sneakers'
    notice[:context][:action] = worker.class.to_s
  end
end

Private Instance Methods

filter_context(context) click to toggle source
# File lib/airbrake/sneakers.rb, line 22
def filter_context(context)
  return context unless context[:delivery_info]
  h = context.dup
  h[:delivery_info] = context[:delivery_info].reject do |k, _v|
    IGNORED_KEYS.include?(k)
  end
  h
end