-
Notifications
You must be signed in to change notification settings - Fork 517
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
Add support for ExceptionGroup #1788
Comments
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
In Sentry we can visualize chained exceptions in the Issues UI. ExceptionGroups could be visualized similarly for the start. Did some poking around in the Python SDK code: We have walk_exception_chain() but this is only used:
So chained exceptions are not handled by default for the fast majority of users. |
The goal of a first step to support ExceptionGroups:
|
This makes sense, and aligns mostly with my thoughts on getsentry/sentry#37716 (comment). Thanks! |
We do still need to decide what we mean by "just pick first exception". Currently (without exception groups) the order of precedence is:
My gut instinct says that we should insert this in the middle, as in:
|
Working on the final spec, but just FYI, I think we will put the full exception group on |
FYI, the plan has changed considerably. Please read the RFC. As it relates to Python:
Please see the detailed Python example in the RFC . This is ultimately a modification to how chained exceptions are represented. As to whether the chained exceptions integration is enabled by default or not for the Python SDK, I'm not sure. Do keep in mind that switching it on by default might create a lot of noise for those that are used to it being off. (@mitsuhiko might have an opinion on this.) |
I just ran a small bit of test code with the current Python SDK and it seems that chained exceptions in |
Hey @mattjohnsonpint ! |
This feature is now available for SaaS (sentry.io) customers. It will also be included in the next Sentry Self-Hosted release (23.6.0, est. June 2023). On the client side, it requires a supporting SDK. For Python, that's Sentry Python 1.24.0. A similar update was made for .NET, and one is coming soon for JavaScript as well. Please give it a try and let us know what you think. Thanks! |
Problem Statement
ExceptionGroup was introduced in Python 3.11:
https://peps.python.org/pep-0664/#features-for-3-11
https://peps.python.org/pep-0654/
Our current SDK v1.12.0 does not support capturing all exceptions separately with its own stack traces so they can be shown in Sentry UI.
This issue was originally raised here in a general manner to expand the feature to other SDKs: getsentry/sentry#37716
The text was updated successfully, but these errors were encountered: