Skip to main content

How can I change the timeout for app hangs?

Updated over a month ago

Issue

The default minimum amount of time an app can be unresponsive before it is classified as hanging (2 seconds) does not suit me, and I'd like to adjust it.

Applies To

  • All SaaS customers

  • Error Monitoring

  • Cocoa SDK

  • React Native SDK

Resolution

You can adjust the timeout by setting the appHangTimeoutInterval in the SDK init block, as follows. Both values are in seconds.

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

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

For Cocoa:

import Sentry

SentrySDK.start { options in
options.dsn = "https://[email protected]/155735"
options.appHangTimeoutInterval = 1
}
Did this answer your question?