-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Linked exceptions and which is used for grouping? #59679
Comments
Assigning to @getsentry/support for routing ⏲️ |
Routing to @getsentry/product-owners-unknown for triage ⏲️ |
Routing to @getsentry/product-owners-issues for triage ⏲️ |
@Parakoos - You're right, that does seem like incorrect behavior! I'm going to mark this as a bug and add it to our backlog. For posterity, here's what I found when I was digging into this:
So, it seems to me that the solution is either for the SDK to tag the outermost error as something other than an exception group, or for the logic I linked above to detect cases where the root error is meaningful rather than just a collector, and handle them differently. @AbhiPrasad - As someone who both approved the RFC and knows the SDK, which of the above do you think is a better solution? [UPDATE: I've talked myself out of the SDK option, I think - see my comment below. Still curious if you have thoughts, but I'm going to throw this on our grouping project board for now.] UPDATE: Here's a screenshot of the JSON I linked above, showing the problem. The error we want to group on is marked as an exception group, and therefore it's not chosen as the "main" error. |
Oh wow, well, I'm glad I reported it then! 😃 While you are working on this, is there some kind of workaround to manually set the |
You could try wrapping your real error in an If we did it for real in the SDK, we might have to make changes in our backend, too, to compensate. (The more I talk about this, the more I think that the SDK route probably isn't the way for us to fix this, for exactly that reason. Probably better/easier to just throw a check into our logic for setting All of that said, really the thing is for us to fix this, rather than for you to resort to workarounds. No guarantee given the holidays, competing priorities, etc., but if this is an easy fix, I'll try to advocate for it getting pulled from the backlog. |
I'd avoid making changes in the SDK if possible, and changing how we set |
Yup, I agree with you.
If nothing else, I kind of don't feel like tracking down all of the possible side effects of setting a different value for Thanks for taking a look! |
@johndoherty, continuing the conversation from #60194 - You say the title used to be x and now it's y. How recently did you notice a change? And would it be possible for you to send me the ids of before and after events, along with the number that appears after |
Thanks for following up @lobsterkatie! This started for us when we updated the sentry js library from version 7.46.0 to 7.74.1 about a month ago. Here are the event and issue IDs: After This is not the only "after" issue as the original issue as been split into several new issues because of the grouping change. Let me know if there's more info I can provide! |
Thanks for those - I checked them out, and that did in fact make at least the proximate problem's cause clear. Between 7.46 and 7.74, the SDK changed how it reports linked errors, presumably in order to support exception groups. You can see the difference in the first screenshot below (7.46 on the left, and 7.74 on the right). As mentioned above, our This is definitely on our list to fix. I'll update here once I know anything more concrete than that. |
I also experienced this problem, same kind of use cases as @Parakoos. A common use case is also when we get an AxiosError which could happen for many different reasons (bad network, 404, bad request, etc) and all for different functionalities and endpoints. Therefore we also throw a custom error (with original as cause) to group them according to logic and make it tidy. My temporary solution is to use an earlier version of the SDK until this is solved. |
I'm so glad I found this and that it is indeed a bug and not a change in approach. Using Errors with cause is such a useful mechanic, but only when the |
Any updates on this? If you have any idea for a workaround that would allow us to use |
+1, we are paying Sentry a heft sum each month and this bug is completely unacceptable – it makes search unusable for us for any issues with linked errors. |
Appreciate y'all sharing your use cases with us. We'll revisit this issue today and share an update when we have a plan for a fix or a fix itself. |
After more investigation, @AbhiPrasad and I agreed that the change actually should come in the SDK. It's currently marking linked errors as exception groups, when that designation should be reserved for instances of We'll post an update when we have news on that fix. |
@lobsterkatie Will second how crippling this issue is, considering this is a costly paid service and this issue renders the service almost pointless. I would expect this issue to receive a very high priority, its been open for months. |
Hey folks - we've been busy working on our new major version for the JS SDK, which has been our primary focus. Apologies for the delay, we'll bump this up in priority |
We've released a fix for this as part of JS SDK release https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0. |
Environment
SaaS (https://sentry.io/)
What are you trying to accomplish?
When playing a sound, I wrap the code in a try-catch and if I get a
NotAllowedError
then I catch it and wrap it in my own kind of error, with a more meaningful error message:throw new SgtError('Permission to play sounds not given.', caughtError)
(where the constructor will set the cause property to the given error)In Sentry, I can see the two errors:
BUT! And here is my problem, all the grouping, fingerprinting and the title and error message of the Sentry issue are all based on the underlying
NotAllowedError
.This becomes a problem when in a different part of the code, I try to set the Wake Lock and that operation also throws
NotAllowedError
and so when I wrap that in a different custom error with a different message, the sound-related issues are all mixed up with the wake-lock issues, since the underlying error is the same, and the 'parent error' is ignored.How are you getting stuck?
I would like to be able to signal to Sentry to focus on the main error instead of the linked error. Is there a way to do this? I am already using
beforeSend
to set custom finger prints for these errors, but... it seems clumsy and I can't seem to find a way to fix other things like title and description in the UI.Where in the product are you?
Unknown
Link
No response
DSN
No response
Version
No response
┆Issue is synchronized with this Jira Improvement by Unito
The text was updated successfully, but these errors were encountered: