A React Native app can look healthy on every dashboard and still feel broken. The JavaScript thread freezes for a second, taps do nothing, and the user leaves. No crash is logged, so your crash-free rate stays at 99.9% while retention quietly drops.
Sentry React Native 8.34.0 targets exactly this gap. It adds experimental enableJsHangTracking, which reports JavaScript thread hangs on iOS as errors. It also adds longTaskIntegration, which reports JS long tasks as a metric. That integration needs React Native 0.82 or later with the New Architecture. The release also adds JavaScript (Hermes) samples to UI profiles on Android 15 and later.
Why JS Hangs Matter
The JS thread runs your business logic, state updates and navigation. When one task blocks it, touch handling stalls even though the native UI is fine. Users describe this as “laggy” or “unresponsive” rather than “crashed”, so it rarely appears in support tickets with useful detail.
Data Points to Track
hang_duration_msfor each reported JS hangscreen_nameor route active when the hang beganapp_versionandsdk_versionrn_versionand whether the New Architecture is enabledos_name,os_versionanddevice_modellong_task_countper sessionlong_task_p95_msper screenuser_action_before_hang(for example, list scroll or form submit)session_exit_after_hangas a boolean
Setup Steps
- Upgrade
@sentry/react-nativeto 8.34.0 or later and rebuild the native app. - Confirm your React Native version is 0.82 or later with the New Architecture if you want long task metrics.
- Set
enableJsHangTracking: trueinSentry.init. It is experimental, so enable it for a small share of users first. - Add
longTaskIntegrationto your integrations list. - Tag releases and environments so hangs can be compared across builds.
- Create a saved view that groups hangs by screen and release.
- Send a custom event when a session ends within 30 seconds of a hang, so you can measure the impact on retention.
Actionable Insights
Rank screens by long task p95 rather than by average. Averages hide the rare two-second freeze that users actually notice.
Compare hang rates before and after each release. A jump usually traces back to a new list, a heavy JSON parse or a state update that re-renders too much.
Link hangs to exits. If sessions that contain a hang end sooner or convert less, you have a business case for performance work, not just an engineering preference.
Keep in mind that the iOS hang reporting is experimental. Treat early numbers as directional, and validate a suspected hot spot with a profile before you rewrite code.
Common Mistakes to Avoid
Do not enable every option for every user on day one. Hang tracking is experimental, and extra instrumentation on the JS thread has a cost of its own, so roll it out gradually and watch your own performance numbers.
Do not blame the device. Low-end Android phones hang more often, but a hang that appears on every device points to your code. Segment by device tier before deciding where to invest.
Do not ignore the New Architecture split. Long task metrics only exist for apps on React Native 0.82 or later with it enabled, so a missing chart on older builds is expected, not a bug.