class Airbrake::Filters::KeysAllowlist
@see KeysFilter
@see KeysBlocklist
# account_id: 42 }
# email: ‘john@example.com’,
# password: ‘[Filtered]’,
# { user: ‘John’,
# values won’t be affected:
# The dashboard will display this parameters as filtered, but other
})
account_id: 42
email: ‘john@example.com’,
password: ‘s3kr3t’,
user: ‘John’,
airbrake.notify(StandardError.new(‘App crashed!’), {
airbrake.add_filter(filter)
)
[:email, /credit/i, ‘password’]
filter = Airbrake::Filters::KeysAllowlist.new(
@example
notice, but specified keys.
A default Airbrake notice filter. Filters everything in the payload of a
def initialize(*)
def initialize(*) super @weight = -100 end
def should_filter?(key)
-
(Boolean)
- true if the key doesn't match any pattern, false
def should_filter?(key) @patterns.none? do |pattern| if pattern.is_a?(Regexp) key.match(pattern) else key.to_s == pattern.to_s end end end