You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying motivation: I'd like to ignore certain exceptions via discard_classes but nonetheless report information about them to a metrics store (e.g. if I see FooException, we shouldn't report it to Bugsnag but should tell Prometheus, Datadog, or whatever).
In implementing this, I discovered that notify bails out before the add_on_error code runs when that exception is marked to be ignored. This, of course, makes good sense! But also blocks what I was trying to do.
So basically, I'd like to see if we could add a hook that runs, regardless of whether exception is marked to be ignored, whether the release stage is marked to be ignored, and so on.
I'm happy to do the legwork on this one if you all are ok with adding it to the library.
I'd also love to be told that this is possible through other means that I don't know about!
Describe the solution you'd like
Re-institute configuration.before_notify_callbacks or some other hook that lets you run arbitrary code against a report prior to the filtering process.
Describe alternatives you've considered
Using add_on_error: doesn't work AFAICT, since notify bails before it hits the callbacks
Adding user middleware: doesn't work AFAICT, since notify bails before it hits the callbacks
Doing this outside of the bugsnag-ruby library is certainly plausible, but I wanted to see if we might get it in here.
The text was updated successfully, but these errors were encountered:
What we'd recommend for your scenario it to not use discard_classes but instead store your own list of classes to discard. Then in add_on_error once you've run your other code return false if the exception class is in your own list to prevent it being reported to Bugsnag.
Keeping this issue open though as we may be able to support this a better way within bugsnag-ruby in the future.
Description
The underlying motivation: I'd like to ignore certain exceptions via
discard_classes
but nonetheless report information about them to a metrics store (e.g. if I seeFooException
, we shouldn't report it to Bugsnag but should tell Prometheus, Datadog, or whatever).In implementing this, I discovered that
notify
bails out before theadd_on_error
code runs when that exception is marked to be ignored. This, of course, makes good sense! But also blocks what I was trying to do.So basically, I'd like to see if we could add a hook that runs, regardless of whether exception is marked to be ignored, whether the release stage is marked to be ignored, and so on.
I'm happy to do the legwork on this one if you all are ok with adding it to the library.
I'd also love to be told that this is possible through other means that I don't know about!
Describe the solution you'd like
Re-institute
configuration.before_notify_callbacks
or some other hook that lets you run arbitrary code against areport
prior to the filtering process.Describe alternatives you've considered
add_on_error
: doesn't work AFAICT, sincenotify
bails before it hits the callbacksnotify
bails before it hits the callbacksbugsnag-ruby
library is certainly plausible, but I wanted to see if we might get it in here.The text was updated successfully, but these errors were encountered: