Skip to content

Commit 519e600

Browse files
antonisclaude
andcommitted
docs(react-native): Add pause/resume app hang tracking API
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c12dbf1 commit 519e600

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/platforms/react-native/configuration/app-hangs.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,19 @@ Sentry.init({
3030
});
3131
```
3232

33+
### Pause and Resume App Hang Tracking (iOS only)
34+
35+
Starting with version 8.12.0, you can pause and resume app hang tracking at runtime. This is useful when showing system dialogs (for example, permission prompts) that block the main thread but aren't real app hangs.
36+
37+
```javascript
38+
import * as Sentry from "@sentry/react-native";
39+
40+
Sentry.pauseAppHangTracking();
41+
42+
// Do something that might cause the app to hang,
43+
// and you don't want the SDK to report it.
44+
45+
Sentry.resumeAppHangTracking();
46+
```
47+
3348
To read more about how app hangs are detected, check out the `sentry-cocoa` [documentation](/platforms/apple/configuration/app-hangs/).

0 commit comments

Comments
 (0)