Skip to content

Commit 3f73070

Browse files
authored
Merge branch 'main' into antonis/feedback-shake-native
2 parents 99f2507 + 449b1c8 commit 3f73070

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- Add `expoUpdatesListenerIntegration` that records breadcrumbs for Expo Updates lifecycle events ([#5795](https://github.com/getsentry/sentry-react-native/pull/5795))
1515
- Tracks update checks, downloads, errors, rollbacks, and restarts as `expo.updates` breadcrumbs
1616
- Enabled by default in Expo apps (requires `expo-updates` to be installed)
17+
- feat(android): Expose `enableAnrFingerprinting` option ([#5838](https://github.com/getsentry/sentry-react-native/issues/5838))
1718
- Show feedback widget on device shake ([#5754](https://github.com/getsentry/sentry-react-native/pull/5754))
1819
- Use `Sentry.enableFeedbackOnShake()` / `Sentry.disableFeedbackOnShake()` or set `feedbackIntegration({ enableShakeToReport: true })`
1920

packages/core/android/src/main/java/io/sentry/react/RNSentryStart.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ static void getSentryAndroidOptions(
151151
if (rnOptions.hasKey("enableTombstone")) {
152152
options.setTombstoneEnabled(rnOptions.getBoolean("enableTombstone"));
153153
}
154+
if (rnOptions.hasKey("enableAnrFingerprinting")) {
155+
options.setEnableAnrFingerprinting(rnOptions.getBoolean("enableAnrFingerprinting"));
156+
}
154157
if (rnOptions.hasKey("spotlight")) {
155158
if (rnOptions.getType("spotlight") == ReadableType.Boolean) {
156159
options.setEnableSpotlight(rnOptions.getBoolean("spotlight"));

packages/core/src/js/options.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ export interface BaseReactNativeOptions {
7373
*/
7474
enableNdkScopeSync?: boolean;
7575

76+
/**
77+
* When enabled, ANR events whose stacktraces contain only system frames
78+
* (e.g. `java.lang`, `android.os`) are assigned a static fingerprint and
79+
* grouped into a single issue instead of creating many separate issues.
80+
*
81+
* Enabled by default in the Android SDK since v8.35.0.
82+
* Set to `false` to restore per-stacktrace ANR grouping.
83+
*
84+
* @default true
85+
* @platform android
86+
*/
87+
enableAnrFingerprinting?: boolean;
88+
7689
/**
7790
* When enabled, all the threads are automatically attached to all logged events on Android
7891
*

0 commit comments

Comments
 (0)