Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

### Features

- Add `enableTombstone` option for improved native crash reporting on Android 12+ ([#3526](https://github.com/getsentry/sentry-dart/pull/3526))
- When enabled, uses Android's `ApplicationExitInfo.REASON_CRASH_NATIVE` to capture native crashes with more detailed thread information
- Disabled by default

### Dependencies

- Bump Native SDK from v0.12.6 to v0.12.7 ([#3514](https://github.com/getsentry/sentry-dart/pull/3514))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ void configureAndroidOptions({
androidOptions
.setAnrTimeoutIntervalMillis(options.anrTimeoutInterval.inMilliseconds);
androidOptions.setAnrEnabled(options.anrEnabled);
androidOptions.setTombstoneEnabled(options.enableTombstone);
Comment thread
buenaflor marked this conversation as resolved.
androidOptions.setAttachThreads(options.attachThreads);
androidOptions.setAttachStacktrace(options.attachStacktrace);

Expand Down
6 changes: 6 additions & 0 deletions packages/flutter/lib/src/sentry_flutter_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ class SentryFlutterOptions extends SentryOptions {
/// Available only for Android. Enabled by default.
bool anrEnabled = true;

/// Enable or disable Tombstone reporting for improved native crash reporting.
/// When enabled, uses Android's `ApplicationExitInfo.REASON_CRASH_NATIVE` to
/// capture native crashes with more detailed thread information.
/// Available only for Android 12+ (API level 30+). Disabled by default.
bool enableTombstone = false;

Duration _anrTimeoutInterval = Duration(milliseconds: 5000);

/// ANR Timeout internal. Default is 5000 milliseconds or 5 seconds.
Expand Down
7 changes: 7 additions & 0 deletions packages/flutter/test/sentry_flutter_options_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,12 @@ void main() {
expect(options.enableMemoryPressureBreadcrumbs, isTrue);
expect(options.enableAutoNativeBreadcrumbs, isFalse);
});

testWidgets('enableTombstone defaults to false',
(WidgetTester tester) async {
final options = defaultTestOptions();

expect(options.enableTombstone, isFalse);
});
});
}
Loading