-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
SDK Crash Detection: Enable Native #66418
Comments
@supervacuus, I need your input, please. If you don’t know what SDK crash detection is, read this. I plan to enable the SDK crash detection for the native SDK. To do this, I need to create a configuration similar to what we already have for the Cocoa SDK. sentry/src/sentry/utils/sdk_crashes/sdk_crash_detection_config.py Lines 72 to 100 in f76c673
This is how the native configuration would roughly look: native_config = SDKCrashDetectionConfig(
// ...
sdk_names=[
"sentry.native"
],
min_sdk_version="",
system_library_path_patterns={
r"C:\WINDOWS\SYSTEM32\*",
},
sdk_frame_config=SDKFrameConfig(
function_patterns={
r"sentry_*",
},
# The native SDK usually has the same path as the application binary.
# Therefore, we can't rely on it. We set a fixed path of Sentry for
# The SDK frames are so it's not empty.
path_patterns={},
path_replacer=FixedPathReplacer(path="sentry"),
),
sdk_crash_ignore_functions_matchers={},
) @supervacuus, please answer the following questions:
|
These are the names I am currently aware of:
I think this should be enough to get started. The pattern covers
Planned, but not released. We can add this when we release it.
This is the toughest question because I am unsure how this is independent of the existing grouping configurations and its concrete effect inside the detection. I guess you define an SDK crash as finding a frame that matches I would collect all sentry/src/sentry/grouping/enhancer/enhancement-configs/newstyle@2023-01-11.txt Lines 11 to 16 in e1457f2
sentry/src/sentry/grouping/enhancer/enhancement-configs/newstyle@2023-01-11.txt Lines 48 to 52 in e1457f2
sentry/src/sentry/grouping/enhancer/enhancement-configs/newstyle@2023-01-11.txt Lines 88 to 90 in e1457f2
sentry/src/sentry/grouping/enhancer/enhancement-configs/newstyle@2023-01-11.txt Lines 103 to 104 in e1457f2
sentry/src/sentry/grouping/enhancer/enhancement-configs/newstyle@2023-01-11.txt Lines 109 to 110 in e1457f2
But as you can see in the file, the config contains many more pattern categories than just paths, which all have a considerable impact if applied (or not). So, maybe I do not understand the question. Wouldn't the SDK crash detection run after applying the above configuration? |
Maybe @Swatinem can cross-check my answers? Thx! |
The answers are spot-on. And I agree that classifying the paths might be the most difficult thing here. And I’m also curious about how this new classification is different from whatever grouping is doing? Or if it could potentially use the same infrastructure underneath? (given that I recently rewrote the grouping enhancers code in Rust for a very nice perf bost) |
That is technically correct 😸; our users could even modify them. However, all downstream SDKs essentially set static strings, which are only assigned during runtime because the build sometimes can't know where the library is used later on. So, I think it is fair to use a predefined list. |
Thanks, @supervacuus and @Swatinem for your replies 😃.
If, in most cases, the SDK name is
I didn't choose that road because I wanted to iterate fast on the feature and they don't necessarily match 100%. I can evaluate reusing the same infrastructure later, but I wouldn't do it now. |
I overlooked your question, @supervacuus.
The paths in the config actually map to I don't understand that part. Please rephrase it.
|
👍
You already answered this question with the following:
I have very little knowledge of what happens to events after leaving relay, so my naive idea was that your processing occurs after the grouping enhancer already has applied the rules I referenced above. I understand that these convenience rules may not match the crash detection goals, but for the native cases, I think that at least the It also sounds like a topic that needs fine-tuning over time. We should allow false positives rather than false negatives and then tune towards reducing the false positives if they start to feel like noise. This reminds me that I have two issues that are apparent crashes in the Native SDK, which we currently can't reproduce. They seem related, and I would love to know whether this affects many users. I heard that you might be happy with positive examples for testing: |
I recall one more reason why I didn't want to use the grouping rules: PII. All crash events end up in a Sentry project, and we have to be careful not to collect stacktraces and any other data that could contain PII. Still, we might be able to reuse the grouping config, but not for now. |
Full rollout completed. We can close this. |
Enable the SDK crash detection for the sentry-native SDK.
Tasks
Rollout Plan
The text was updated successfully, but these errors were encountered: