You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/event-loop-block.mdx
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Application Not Responding (ANR)
2
+
title: Event Loop Block Detection
3
3
sidebar_order: 70
4
-
description: "Learn how to turn off or specify ANRs for Node.js"
4
+
description: "Monitor for blocked event loops in Node.js applications"
5
5
supported:
6
6
- javascript.node
7
7
- javascript.aws-lambda
@@ -25,26 +25,27 @@ supported:
25
25
- javascript.tanstackstart-react
26
26
keywords:
27
27
[
28
+
"event loop block",
28
29
"anr",
29
30
"Application Not Responding",
30
31
"Event Loop Blocked",
31
32
"Event Loop Stalls",
32
33
]
33
34
---
34
35
35
-
Application Not Responding (ANR) errors, or Event Loop Stall errors, are triggered when the Node.js main thread event loop of an application is blocked for more than a specified threshold. The Node SDK reports ANR errors as Sentry events and can optionally attach a stack trace of the blocking code to the ANR event.
36
+
Event Loop Block detection monitors when the Node.js main thread event loop is blocked for more than a specified threshold. The Node SDK reports these events to Sentry with automatically captured stack traces to help identify blocking code.
36
37
37
38
<Includename="feature-stage-beta.mdx" />
38
39
39
40
<Alert>
40
41
41
-
ANR detection is not supported for [Node.js clusters](https://nodejs.org/api/cluster.html).
42
+
Event loop block detection is not supported for [Node.js clusters](https://nodejs.org/api/cluster.html).
42
43
43
44
</Alert>
44
45
45
46
## Event Loop Block Integration (Recommended)
46
47
47
-
For the best performance and comprehensive monitoring, we recommend using the [`eventLoopBlockIntegration`](./integrations/event-loop-block) from the `@sentry/node-native` package. This integration can monitor all threads in your Node.js application and provides better performance compared to the deprecated ANR integration.
48
+
For the best performance and comprehensive monitoring, we recommend using the [`eventLoopBlockIntegration`](./integrations/event-loop-block) from the `@sentry/node-native` package. Stack traces are automatically captured when blocking is detected. This integration can monitor all threads in your Node.js application and provides better performance compared to the deprecated ANR integration.
48
49
49
50
```javascript
50
51
import*asSentryfrom"@sentry/node";
@@ -58,7 +59,7 @@ Sentry.init({
58
59
59
60
For detailed usage instructions and configuration options, see the [`eventLoopBlockIntegration`](./integrations/event-loop-block) documentation.
60
61
61
-
## Deprecated ANR Integration
62
+
## Deprecated Application Not Responding (ANR) Integration
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/integrations/anr.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ This integration only works in the Node.js runtime.
38
38
39
39
_Import name: `Sentry.anrIntegration`_
40
40
41
-
The `anrIntegration` captures Application Not Responding (ANR)/Event Loop Stall errors and reports them as Sentry events. For more details, see the documentation on [ANR](../../application-not-responding).
41
+
The `anrIntegration` captures Application Not Responding (ANR)/Event Loop Stall errors and reports them as Sentry events. For more details, see the documentation on [Event Loop Block Detection](../../event-loop-block).
0 commit comments