Skip to content

Expose Android NDK app hang tracking options (enableNdkAppHangTracking, ndkAppHangTimeoutIntervalMillis) #6546

Description

@antonis

Description

sentry-java 8.48.0 added two SentryAndroidOptions settings that expose sentry-native's heartbeat-based app-hang detection on Android:

  • setEnableNdkAppHangTracking(boolean) — default false
  • setNdkAppHangTimeoutIntervalMillis(long) — default 5000

sentry-react-native does not currently surface either option. On Android, app-hang tracking is treated as iOS-only: pauseAppHangTracking/resumeAppHangTracking are explicit no-ops (packages/core/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java), and the existing enableAppHangTracking / appHangTimeoutInterval options are documented @platform ios (packages/core/src/js/options.ts).

The SDK already bundles sentry-android 8.50.1 (packages/core/android/build.gradle), so the upstream APIs are available.

Suggested change

Add enableNdkAppHangTracking and ndkAppHangTimeoutIntervalMillis options, wired through the Android bridge to SentryAndroidOptions, so they can be configured from JS/TS. This mirrors the Capacitor request in getsentry/sentry-capacitor#1351 (which in turn mirrors iOS via getsentry/sentry-capacitor#1350).

Reference

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions