-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
SDK Crash Detection: Enable Dart/Flutter #66762
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
Comments
@buenaflor, I need your input, please. If you need a refresher on what SDK crash detection is, read this. I plan to enable the SDK crash detection for the Dart SDK. To do this, I need to create a configuration similar to what we already have for the Java SDK. sentry/src/sentry/utils/sdk_crashes/sdk_crash_detection_config.py Lines 154 to 202 in 3e90887
This is how the configuration would roughly look: dart_config = SDKCrashDetectionConfig(
# ...
sdk_names=["sentry.dart", "sentry.dart.flutter"],
# 7.9.0 was released in July 2023, see https://github.com/getsentry/sentry-dart/releases/tag/7.9.0
min_sdk_version="7.9.0",
system_library_path_patterns={
r"third_party/dart/sdk/**", # Dart
r"/opt/flutter/packages/flutter/**", # Flutter
},
sdk_frame_config=SDKFrameConfig(
function_patterns=set(),
path_patterns={
r"**/sentry-**",
},
path_replacer=KeepAfterPatternMatchPathReplacer(
patterns={
r"\/sentry-.*",
},
fallback_path="sentry",
),
),
sdk_crash_ignore_functions_matchers=set(),
) @buenaflor, please answer the following questions:
|
|
@buenaflor, upsi, that's a blocker. Can we start sending them? On Java, we send SDK frames in case of a crash (getsentry/sentry-java#3021), but it's better to do this in the next major because it can affect grouping. Otherwise, the SDK crash detection won't work. |
Hmm is it still feasible to do it in the current major? we've released v8 but it's still pretty new. otherwise we can add this to v9 but tbh I'm not sure when the next major for dart would be released |
@buenaflor, strictly speaking, no, we shouldn't do this without a major, but as these frames aren't inApp in most cases they shouldn't impact grouping. @kahest what do you think? |
I'm wondering why we removed them in the first place. In general I'm ok with doing this in 8.2.0 if we are sufficiently confident that it doesn't affect grouping, especially since v8 is still very new |
Just traced back the change at it has been there since 2020. I'll check how it affects grouping |
This seems to be the case here as well, I tried it out and it still is grouped with the same error without the sentry frame. So I think we're good to go in removing it without a major |
Sentry frames are now included in dart stacktraces as of |
I'm going to use the same rules for system frames that we use for grouping
|
We can't make it work for Flutter Browser because the stacktrace paths don't include enough information to reliably detect where frames come from, but I think that's acceptable. {
"function": "<fn>",
"filename": "main.dart",
"abs_path": "http://localhost:53617/main.dart",
},
{
"function": "setTag",
"filename": "sentry_tracer.dart",
"abs_path": "http://localhost:53617/sentry_tracer.dart",
},
{
"function": "_get]",
"filename": "js_array.dart",
"abs_path": "http://localhost:53617/js_array.dart",
},
{
"function": "throw_",
"filename": "errors.dart",
"abs_path": "http://localhost:53617/errors.dart",
} |
We're sampling at 100% now https://github.com/getsentry/sentry-options-automator/pull/1518. We can close this. |
Uh oh!
There was an error while loading. Please reload this page.
Enable the SDK crash detection for the sentry-dart SDK.
The text was updated successfully, but these errors were encountered: