App Hangs

Learn about how to add app hang detection reporting.

This integration tracks app hangs. This feature is available on iOS, tvOS, and macOS.

Trying to use an unresponsive app is extremely frustrating for users. There are many reasons why an app may become unresponsive, such as long-running code, infinite loop bugs, and so on. With app hang tracking you can detect and fix them.

Every time an App Hang is detected Sentry creates an error event. App Hang Tracking is enabled by default. To disable it, set the enableAppHangTracking option to false:

Copied
import * as Sentry from '@sentry/react-native';

Sentry.init({
  dsn: 'DSN',
  enableAppHangTracking: false,
});

The app hang detection integration has a default timeout of two (2) seconds. This represents the minimum amount of time an app can be unresponsive before it is classified as hanging. You can change the timeout by setting the appHangTimeoutInterval option:

Copied
import * as Sentry from '@sentry/react-native';

Sentry.init({
  dsn: 'DSN',
  appHangTimeoutInterval: 1,
});

To read more about how app hangs are detected, check out the sentry-cocoa documentation.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").