Skip to content
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

fix(processing): [v7] Only mark aggregate errors as exception groups #10866

Merged

Conversation

AbhiPrasad
Copy link
Member

This is a backport of #10850

ref: #10865

When Sentry started supporting the idea of exception groups, two changes
happened. In the SDK, we adapted our logic for handling linked errors to
also handle `AggregateError`s. And in our ingest pipeline, we began
looking for an `is_exception_group` flag on the last entry in
`event.exception.values; when we found it, we'd then ignore that entry
when grouping and titling events, under the assumption that it was just
a container and therefore wasn't meaningful.

When it came to instances of `AggregateError`, this worked great. For
linked errors, however, this caused us to focus on the `cause` error
rather than the error which was actually caught, with the result that it
both threw off grouping and made for some very unhelpful titling of
issues. (See the screenshot below, in which the first three errors are,
respectively, an `UndefinedResponseBodyError`, a `RequestError`, and an
`InternalServerError`, though you'd be hard pressed to figure that out
without opening them up.)

This fixes those problems by restricting the use of the
`is_exception_group` flag to `AggregateError`s.

Note: In order to update the tests to work with this change, I had add
in consideration of the error `name` property and the corresponding
event `type` property, to match what we do in real life. To keep things
readable, there's a new mock `AggregateError` class, which I adapted all
the tests to use.
@AbhiPrasad AbhiPrasad changed the title fix(processing): Only mark aggregate errors as exception groups fix(processing): [v7] Only mark aggregate errors as exception groups Feb 29, 2024
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 78.57 KB (+0.18% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 69.78 KB (+0.17% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 73.72 KB (+0.17% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 63.41 KB (+0.21% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 33.75 KB (+0.39% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 33.66 KB (+0.38% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.4 KB (+0.05% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.4 KB (+0.06% 🔺)
@sentry/browser - Webpack (gzipped) 22.68 KB (+0.1% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 76.81 KB (+0.12% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 68.3 KB (+0.14% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 34.11 KB (+0.23% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 25.09 KB (+0.18% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 215.21 KB (+0.11% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 103.01 KB (+0.22% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 75.32 KB (+0.32% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 37.28 KB (+0.24% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 70.16 KB (+0.19% 🔺)
@sentry/react - Webpack (gzipped) 22.71 KB (+0.1% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 87.87 KB (+0.14% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 52.07 KB (+0.24% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.24 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants