Skip to content

Commit aab708f

Browse files
authored
fix: de-duplicate Java.Lang.RuntimeException on Android (#4509)
* fix: duplicate Java.Lang.RuntimeException on Android
1 parent 0ab3b7f commit aab708f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- `InvalidOperationException` potentially thrown during a race condition, especially in concurrent high-volume logging scenarios ([#4428](https://github.com/getsentry/sentry-dotnet/pull/4428))
1717
- Blocking calls are no longer treated as unhandled crashes ([#4458](https://github.com/getsentry/sentry-dotnet/pull/4458))
1818
- Only apply Session Replay masks to specific control types when necessary to avoid performance issues in MAUI apps with complex UIs ([#4445](https://github.com/getsentry/sentry-dotnet/pull/4445))
19+
- De-duplicate Java.Lang.RuntimeException on Android ([#4509](https://github.com/getsentry/sentry-dotnet/pull/4509))
1920

2021
### Dependencies
2122

src/Sentry/Platforms/Android/SentrySdk.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ private static void InitSentryAndroidSdk(SentryOptions options)
177177
options.CrashedLastRun = () => JavaSdk.Sentry.IsCrashedLastRun()?.BooleanValue() is true;
178178
options.EnableScopeSync = true;
179179
options.ScopeObserver = new AndroidScopeObserver(options);
180+
// Don't capture Java Runtime exceptions in the managed SDK, since we already capture them in the native SDK
181+
options.AddExceptionFilterForType<Java.Lang.RuntimeException>();
180182

181183
// TODO: Pause/Resume
182184
}

0 commit comments

Comments
 (0)