-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
8.19.0
Framework Version
React 17.0.2
Link to Sentry event
No response
SDK Setup/Reproduction Example
No response
Steps to Reproduce
- Log what's going on in
beforeSend - Use
captureFeedback - Check the logs
Expected Result
The docstring of beforeSend says:
An event-processing callback for error and message events, guaranteed to be invoked after all other event
processors, which allows an event to be modified or dropped.
I don't know how exactly to interpret "message events", but to me it seems generic enough to include user feedback events as well.
Of course, I might be missing something, but judging by the source code of processBeforeSend, beforeSend isn't called at all for anything but errors.
My particular use-case is that I put a lot of data into breadcumbs that I then preprocess in beforeSend. I want to avoid doing it when nothing is actually being sent to avoid doing extra work.
I'm now trying to switch from capturing user feedback with uncaught exception to an explicit call to captureFeedback, but it seems that it's not possible at the moment.
Given that beforeSend is used only for errors and only accepts ErrorEvent, it might make sense to add beforeSendFeedback or some more generic version of beforeSend.
Actual Result
beforeSend is never called for feedback messages.
Metadata
Metadata
Assignees
Labels
Projects
Status