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 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.
Description
The underlying motivation: I'd like to ignore certain exceptions via
discard_classesbut 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
notifybails out before theadd_on_errorcode 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_callbacksor some other hook that lets you run arbitrary code against areportprior to the filtering process.Describe alternatives you've considered
add_on_error: doesn't work AFAICT, sincenotifybails before it hits the callbacksnotifybails before it hits the callbacksbugsnag-rubylibrary is certainly plausible, but I wanted to see if we might get it in here.