honeybadger-io / honeybadger-ruby

Ruby gem for reporting errors to honeybadger.io
https://docs.honeybadger.io/lib/ruby/
MIT License
251 stars 145 forks source link

feat: set context during rails error report #649

Closed roelbondoc closed 5 days ago

roelbondoc commented 5 days ago

This will always set the context from Rails when an error is reported even if it is not handled. This will allow applications to use Rails.error.set_context instead of Honeybadger.context and still see that context in errors in the UI.

It would have been nice if Rails provided an event for when set_context is called so that we can hook into that, but this should be ok for now.

Closes: https://github.com/honeybadger-io/honeybadger-ruby/issues/648

Before submitting a pull request, please make sure the following is done:

  1. If you've fixed a bug or added code that should be tested, add tests!
  2. Run rake spec in the repository root.
  3. Use a pull request title that conforms to conventional commits.