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

feat(sdk-crashes): Set SDK version as release #52501

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

philipphofmann
Copy link
Member

Set SDK version as release to understand on which SDK versions the SDK crashes occur.

Set SDK version as release to understand on which SDK versions the SDK
crashes occur.
@philipphofmann philipphofmann requested a review from a team July 10, 2023 08:49
@philipphofmann philipphofmann self-assigned this Jul 10, 2023
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 10, 2023
Comment on lines +68 to +69
sdk_version = get_path(sdk_crash_event_data, "sdk", "version")
set_path(sdk_crash_event_data, "release", value=sdk_version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this overwrite the release the SDK sends? How does this code interact with users manually setting the release in their SDK initialization?

Copy link
Member Author

@philipphofmann philipphofmann Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The allowlist of the event stripper doesn't include the release, as the release stems from the organization sending the event, which would basically be their app release. So we don't overwrite it. Instead, we set it so we can investigate which of our SDK versions is causing the crash in Sentry.

EVENT_DATA_ALLOWLIST = {
"type": Allow.SIMPLE_TYPE,
"datetime": Allow.SIMPLE_TYPE,
"timestamp": Allow.SIMPLE_TYPE,
"platform": Allow.SIMPLE_TYPE,
"sdk": {
"name": Allow.SIMPLE_TYPE,
"version": Allow.SIMPLE_TYPE,
"integrations": Allow.NEVER.with_explanation("Users can add their own integrations."),
},
"exception": {
"values": {
"stacktrace": {
"frames": {
"filename": Allow.NEVER.with_explanation(
"The filename path could contain the app name."
),
"function": Allow.SIMPLE_TYPE,
"raw_function": Allow.SIMPLE_TYPE,
"module": Allow.SIMPLE_TYPE,
"abs_path": Allow.SIMPLE_TYPE,
"in_app": Allow.SIMPLE_TYPE,
"instruction_addr": Allow.SIMPLE_TYPE,
"addr_mode": Allow.SIMPLE_TYPE,
"symbol": Allow.SIMPLE_TYPE,
"symbol_addr": Allow.SIMPLE_TYPE,
"image_addr": Allow.SIMPLE_TYPE,
"package": Allow.SIMPLE_TYPE,
"platform": Allow.SIMPLE_TYPE,
}
},
"value": Allow.NEVER.with_explanation("The exception value could contain PII."),
"type": Allow.SIMPLE_TYPE,
"mechanism": {
"handled": Allow.SIMPLE_TYPE,
"type": Allow.SIMPLE_TYPE,
"meta": {
"signal": {
"number": Allow.SIMPLE_TYPE,
"code": Allow.SIMPLE_TYPE,
"name": Allow.SIMPLE_TYPE,
"code_name": Allow.SIMPLE_TYPE,
},
"mach_exception": {
"exception": Allow.SIMPLE_TYPE,
"code": Allow.SIMPLE_TYPE,
"subcode": Allow.SIMPLE_TYPE,
"name": Allow.SIMPLE_TYPE,
},
},
},
}
},
"contexts": {
"device": {
"family": Allow.SIMPLE_TYPE,
"model": Allow.SIMPLE_TYPE,
"arch": Allow.SIMPLE_TYPE,
"simulator": Allow.SIMPLE_TYPE,
},
"os": {
"name": Allow.SIMPLE_TYPE,
"version": Allow.SIMPLE_TYPE,
"build": Allow.SIMPLE_TYPE,
},
},
}

@philipphofmann philipphofmann merged commit 2af7207 into master Jul 10, 2023
@philipphofmann philipphofmann deleted the feat/sdk-crashes-sdk-version branch July 10, 2023 16:58
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants