Honeybadger v4.0.0 Release Notes
Release Date: 2018-08-21 // over 5 years ago-
โ Added
- โ Added
before_notify
hooks to be defined, this allows setting up of multiple hooks which will be invoked with anotice
before anotice
is sent. Eachbefore_notify
hook MUST be acallable
(lambda, Proc etc,) with an arity of 1. - โ Added the ability to halt notices in callbacks using
notice.halt!
- ๐ Make essential attributes on Notice writable:
ruby Honeybadger.configure do |config| config.before_notify do |notice| notice.api_key = 'custom api key', notice.error_message = "badgers!", notice.error_class = 'MyError', notice.backtrace = ["/path/to/file.rb:5 in `method'"], notice.fingerprint = 'some unique string', notice.tags = ['foo', 'bar'], notice.context = { user: 33 }, notice.controller = 'MyController', notice.action = 'index', notice.parameters = { q: 'badgers?' }, notice.session = { uid: 42 }, notice.url = "/badgers", end end
๐ Fixed
- ๐ฆ Ignore SIGTERM SignalExceptions.
โ Removed
- โ Removed Notice#[]
๐ Changed
- ๐ The public method
Notice#backtrace
is now exposed as the raw Ruby backtrace instead of an instance ofHoneybadger::Backtrace
(a private class).
Before:
notice.backtrace # => #<Honeybadger::Backtrace>
After:
notice.backtrace # => ["/path/to/file.rb:5 in `method'"]
- 0๏ธโฃ
notice[:context]
now defaults to an empty Hash instead of nil.
Before:
notice[:context] # => nil
After:
notice[:context] # => {}
- ๐จ The public method
Notice#fingerprint
now returns the original String which was passed in from the:fingerprint
option or theexception_fingerprint
callback, not a SHA1 hashed value. The value is still hashed before sending through to the API. - ๐ The public method
Honeybadger.exception_filter
has been deprecated in favor ofbefore_notify
:ruby Honeybadger.configure do |config| config.before_notify do |notice| notice.halt! end end
- ๐ The public method
Honeybadger.exception_fingerprint
has been deprecated in favor ofbefore_notify
:ruby Honeybadger.configure do |config| config.before_notify do |notice| notice.fingerprint = 'new fingerprint' end end
- ๐ The public method
Honeybadger.backtrace_filter
has been deprecated in favor ofbefore_notify
:ruby Honeybadger.configure do |config| config.before_notify do |notice| notice.backtrace.reject!{|x| x =~ /gem/} end end
โ Removed
- ๐ The
disabled
option is now removed, Use thereport_data
option instead.
- โ Added