Repository navigation
Add ravenPresend and ravenMessage events - #513
romainneutron wants to merge 1 commit into
Conversation
|
So, we're definitely going to change the event API and get away from DOM events. I'm cool with adding these events; it's just a question of whether it makes sense for us to merge this ahead of those API changes, and wait until the API is done. It will likely look like: Raven.on('send', function () { ... }); // or presend/beforesend
Raven.on('exception', function () { ... });
Raven.on('message', function () { ... });
Raven.on('success', function () { ... });
Raven.on('failure', function () { ... });And then also: Raven.off('send'); // all send events
Raven.off('send', listener); // specific listenerAlso, this will allow people to add multiple event handlers, which wasn't possible earlier. |
|
Wow, this is definitely a better API. When these changes are supposed to land in a production-ready version? |
See: #521, which is targeted against a 3.0 release. We'll probably release 3.0 within a week (hopefully). After which we can re-evaluate this PR. As an aside, if you need to use Re: the |
|
I've added a discussion about changing the events API: #524 @romainneutron – appreciate your thoughts there |
|
Sorry for the late reply. This sounds good. I wanted to use Your proposal looks good, can't wait to test this |
Hello,
As we already have
ravenHandleevent when handling an exception,ravenSuccessandravenFailureevents for post-submitting data, I propose to addravenMessagewhen capturing a messageravenPresendjust before sending data to Sentry server.This improves raven flexibility for the developer as it allows him to tweak the data.