getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
37.54k stars 4.04k forks source link

Consider all stack traces for grouping #60184

Open kerenkhatiwada opened 7 months ago

kerenkhatiwada commented 7 months ago

Problem Statement

At the moment it seems Sentry groups using only one stack trace. This is an issue when there are two stack traces for an issue that are completely different.

Solution Brainstorm

Consider all stack traces for grouping

Product Area

Issues

getsantry[bot] commented 7 months ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 7 months ago

Routing to @getsentry/product-owners-issues for triage ⏲️

lobsterkatie commented 7 months ago

@kerenkhatiwada, can you please share some links to events which show this behavior? And when you say "multiple stacktraces," do you mean events with error groups or chained errors, or something else?

kerenkhatiwada commented 7 months ago

Here is an event where we were able to reproduce it. This occurs for javascript error.cause issues. However, AggregateErrors are grouped by all stack traces.

lobsterkatie commented 7 months ago

Thanks for that. And yeah, this is just a slight twist on https://github.com/getsentry/sentry/issues/59679 from earlier this week. As it happens, AggregateErrors aren't grouped on all stacktraces, just potentially more of them than in this case. (See the second example here.) Regardless, we handle this case incorrectly right now.

Question: The current fix for the linked issue is to consider the top error rather than the wrapped one. Would that serve your purposes, or would you actually want both stacks to be included?

eps1lon commented 1 month ago

React 19 will start leveraging the cause property.

Unfortunately, in Sentry, issues are grouped by the actual error message ("There was an error while hydrating but React was able to recover by") not by the cause. I think having the parent as an issue is still nice as an umbrella issue. But the cause should be in a separate issue as well. Ideally with the same trace parent.

Screenshot 2024-05-29 at 13 21 36 Screenshot 2024-05-29 at 13 21 52

JoshFerge commented 1 month ago

thank you @eps1lon -- will get with the team internally and figure out next steps here.

AbhiPrasad commented 3 weeks ago

React 19 concerns fixed with https://github.com/getsentry/sentry/pull/72593