Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mobile] Enable Sentry ANR capture on Android

AmanRajSinghMourya9c7d44d13100
diff --git a/mobile/apps/photos/lib/core/error-reporting/super_logging.dart b/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
index 632e8349dc..dab2bb980e 100644
--- a/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
+++ b/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
@@ -251,6 +251,8 @@ class SuperLogging {
await SentryFlutter.init(
(options) {
options.dsn = appConfig!.sentryDsn;
+ options.anrEnabled = true;
+ options.anrTimeoutInterval = const Duration(seconds: 5);
options.httpClient = http.Client();
if (appConfig.tunnel != null) {
options.transport = TunneledTransport(
diff --git a/mobile/packages/logging/lib/super_logging.dart b/mobile/packages/logging/lib/super_logging.dart
index 077adf4e05..168a0d52fe 100644
--- a/mobile/packages/logging/lib/super_logging.dart
+++ b/mobile/packages/logging/lib/super_logging.dart
@@ -201,6 +201,8 @@ class SuperLogging {
if (enable && sentryIsEnabled) {
await SentryFlutter.init((options) {
+ options.anrEnabled = true;
+ options.anrTimeoutInterval = const Duration(seconds: 5);
options.dsn = appConfig!.sentryDsn;
options.httpClient = http.Client();
if (appConfig.tunnel != null) {