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 a notice before a notice is sent. Each before_notify hook MUST be a callable (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 of Honeybadger::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 the exception_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 of before_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 of before_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 of before_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 the report_data option instead.