Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply grouping hash if method bugsnag_grouping_hash is available on the object #311

Closed
Nowaker opened this issue Aug 15, 2016 · 0 comments
Closed

Comments

@Nowaker
Copy link

Nowaker commented Aug 15, 2016

Conversion with Simon Maynard dated December 2015:

Proposal: what if you added support for passing a grouping hash through the exception object? If exception object that Bugsnag handler rescues respond_to? :bugsnag_grouping_hash, use this as the grouping hash.

You can get access to the exceptions by calling notification.exceptions and that should give that to you. I think adding grouping_hash support to exceptions would seem reasonable - we already have a similar thing for metadata in https://github.com/bugsnag/bugsnag-ruby/blob/master/lib/bugsnag/notification.rb#L313 and I'll look into doing that in the new year (unless you fancy sending a PR yourself). In the interim you could use the exceptions method https://github.com/bugsnag/bugsnag-ruby/blob/master/lib/bugsnag/notification.rb#L279

Thanks for pointing me to exceptions method. This will do the job. Ultimately, having grouping_hash (or bugsnag_grouping_hash?) would be the best. Very powerful with no plumbing needed.

When bugsnag_meta_data is available on an exception, Bugsnag adds it automatically to the Bugsnag report. So should be done with bugsnag_grouping_hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant