-
Notifications
You must be signed in to change notification settings - Fork 207
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
Move exception group fields to mechanism #800
Conversation
Shall we add Also other SDK-s have special logic for IsExceptionGroup, while for Go the only logic is if it's wrapped - it's an exception group. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #800 +/- ##
==========================================
- Coverage 81.20% 81.08% -0.13%
==========================================
Files 49 49
Lines 4087 4087
==========================================
- Hits 3319 3314 -5
- Misses 629 632 +3
- Partials 139 141 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the grouping mechanism so to clarify the discrepancy between RFC and implementations in other SDKs and the UI, I suggest you reach out to the developers that landed this in SDKs and maybe find a related PR in https://github.com/getsentry/sentry as well
"parent_id": 0, | ||
}, | ||
ExceptionID: 1, | ||
ParentID: Pointer(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a fan of the pointer type here. It's not referring to a memory address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for using pointer is that for first exception, it expects 0
for exception_id and nothing for parent_id. The second exception is {"exception_id":1,"parent_id":0}
. Since go defaults to 0 for zero int values, it wouldn't work for first exception.
It's either using pointers (simpler) or a nullable type with custom marshal function (something like sql.NullInt16).
They are definitely on Mechanism level, not data. This PR should fix that. Example: getsentry/sentry@f4fa54e |
The source of truth is always the protocol implemented in Relay. Changes look good to me, besides this |
The reason for using the pointer type for So it's either using a pointer to achieve this (what I did) or using a nullable value (something like sql.NullInt16). |
While updating
develop
for #1204, noticed that the new mechanism fields were at the wrong place.RFC 0079 specifies these fields (is_exception_group, parent_id, exception_id) to be in the mechanism.
This is how I initially implemented it, but for some reason (UI being broken?) I moved them to Data which is wrong according to RFC and other SDKs.
This is how it looks like on the UI.
#skip-changelog