Issue
I have set denyUrls
to filter out events, but it is only looking at the top entry in the stack trace, so it sends my events anyway.
Applies To
- All Customers
- Error Monitoring
- Filtering Events
Resolution
You can use beforeSend, which will look at the event right before it is sent to Sentry. You can set up custom code that will traverse through the event's stack trace, and if it finds what you are looking for, it will drop the event. Here is an example code snippet:
beforeSend(event) { for (let i in event.exception.values[0].stacktrace.frames) { if (event.exception.values[0].stacktrace.frames[i].filename.match(/chrome-extension/g)) return null; } return event; },