-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Introduce internal event "quality score" for outgoing events #10882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could this be done in |
In theory, yes BUT The same is true for transactions; we set the status to So this could be technically done in Relay to then also drop a Replay/transaction when there is a crappy error - tho it's super complex and not easy to implement and might even require tail-based sampling. |
I think this is a good idea and something we should explore a bit more.
Big +1, probably easy to do in the SDK with little code (and yes probably SDK specific how such low quality errors can be identified) 👍
Generally yes but I'd say these depend a lot on how we'd identify such individual edge cases. For instance, only by error message? we should consider adding them as a server-side inbound filter. checking against strings (or RegExp) could become bundle size intensive depending on how many such cases we handle. IIRC we already handle the infamous If there's a deeper pattern (I dunno think something like, only anonymous stack frames or a certain amount of frames in combination with another factor) it probably makes sense to keep this in the SDK. |
Yeah there is a balance to strike - but the goal is not to send them from the SDK because so much already is connected to errors (what I mentioned, Replays/Transactions etc.) |
I may not have standing here, but the SDK seems like the wrong place to do it, especially for browser JS since this code will add to bundle size. We also require folks to update SDKs to get these changes (obviously) which means that doing this in replay is a higher leverage change by the number of users impacted immediately. I see there are some downsides doing this in Relay but I think we should do more investigation before we decide. |
So just to add a perspective for Replay: Replay's error sampling is based on a 200 response when an error event is sent. So in order to keep this working "as expected", either we need to drop errors in the SDK, or they need to be dropped early enough that we actually get a non-200 status code. If errors are dropped anywhere later (e.g. as currently for inbound filters) the SDK does not know about it and thus replay sampling cannot take it into consideration. |
The googletag error should already be filtered out since The other one ( |
|
Another one |
Consider: getsentry/sentry#69096 |
…nd filter (#3442) There are some errors in Sentry that throw this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Property_access_denied Often these errors are caused by extensions that do things that are not allowed. The samples we found in Sentry are thrown in minified React bundles. ref: getsentry/sentry-javascript#10882 (comment)
RE getsentry/sentry#69096 and related issues where filtering on the message isn't enough. I think in theses cases we want to make filtering decisions on the original stack trace, meaning ideally, before our SDK integrations and event processors come in and potentially modify the stack frames (e.g. |
BIG BRAIN idea we just had: What if users would be able to tell Sentry "this is a list of all the static JS files I am deploying, please ignore everything that doesn't come from those files". We have all the building blocks already: |
Dumping a few thoughts for posterity:
Immediate plan of action based on my thoughts and research: Since the vast majority of noisy issues in the internal Sentry Sentry project or the Sentry Docs project come from browser extensions or similar, it makes most sense to a) work on getting the third party code filter integration out b) improve documentation around Next, we can filter out:
|
Thread to revisit when we ship: https://www.reddit.com/r/nextjs/comments/1d5fxx8/anyone_using_sentry_while_not_getting_overwhelmed/ |
Summing up the changes we did:
|
Problem Statement
Javascript errors/events can be very noisy - and our SDK today send a lot of data.
We have simple mechanisms in place like
InboundFilters
sentry-javascript/packages/core/src/integrations/inboundfilters.ts
Lines 9 to 13 in 652b621
to remove specific errors that and not worth sending.
Tho this is not enough and still a lot of clutter reaches Sentry, from weird chrome extension errors to other edge cases of low quality events that are just noise (no good message / no stacktrace)
Solution Brainstorm
What if we add a very simple internal "Quality Score" for an error/event in the SDK and only if it reaches a certain value, we actually send it.
For example:
new Error(undefined)
& no message & no stack trace-> Drop
No exception, no stack trace, no message
-> Drop
Weird edge cases we identified ourselves by looking at Sentry Events
-> Drop
A stack trace with no message and only one single frame with
<anonymous>
-> Drop
It could operate on the payload/JSON level to make it relatable to what enters Sentry.
The text was updated successfully, but these errors were encountered: