Skip to content

feat(sdk-crash): Keep more exception fields #68680

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

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions fixtures/sdk_crash_detection/crash_event_cocoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def get_crash_event_with_frames(
"mechanism": {
"handled": handled,
"type": "mach",
"synthetic": False,
"meta": {
"signal": {
"number": 11,
Expand All @@ -140,6 +141,10 @@ def get_crash_event_with_frames(
"subcode": 0,
"name": "EXC_BAD_ACCESS",
},
"errno": {
"number": 10,
"name": "EACCES",
},
},
},
}
Expand Down
5 changes: 5 additions & 0 deletions src/sentry/utils/sdk_crashes/event_stripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def with_explanation(self, explanation: str) -> "Allow":
"type": Allow.SIMPLE_TYPE,
"mechanism": {
"handled": Allow.SIMPLE_TYPE,
"synthetic": Allow.SIMPLE_TYPE,
"type": Allow.SIMPLE_TYPE,
"meta": {
"signal": {
Expand All @@ -75,6 +76,10 @@ def with_explanation(self, explanation: str) -> "Allow":
"subcode": Allow.SIMPLE_TYPE,
"name": Allow.SIMPLE_TYPE,
},
"errno": {
"number": Allow.SIMPLE_TYPE,
"name": Allow.SIMPLE_TYPE,
},
},
},
}
Expand Down
5 changes: 5 additions & 0 deletions tests/sentry/utils/sdk_crashes/test_event_stripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def test_strip_event_data_keeps_exception_mechanism(store_event, configs):

assert mechanism == {
"handled": False,
"synthetic": False,
"type": "mach",
"meta": {
"signal": {"number": 11, "code": 0, "name": "SIGSEGV", "code_name": "SEGV_NOOP"},
Expand All @@ -179,6 +180,10 @@ def test_strip_event_data_keeps_exception_mechanism(store_event, configs):
"subcode": 0,
"name": "EXC_BAD_ACCESS",
},
"errno": {
"number": 10,
"name": "EACCES",
},
},
}

Expand Down
Loading