File tree Expand file tree Collapse file tree 8 files changed +13
-14
lines changed
google-cloud-serverless/src
node/src/integrations/anr Expand file tree Collapse file tree 8 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ export {
12
12
addEventProcessor ,
13
13
addIntegration ,
14
14
amqplibIntegration ,
15
+ // eslint-disable-next-line deprecation/deprecation
15
16
anrIntegration ,
17
+ // eslint-disable-next-line deprecation/deprecation
16
18
disableAnrDetectionForCallback ,
17
19
captureCheckIn ,
18
20
captureConsoleIntegration ,
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ export {
42
42
close ,
43
43
getSentryRelease ,
44
44
createGetModuleFromFilename ,
45
+ // eslint-disable-next-line deprecation/deprecation
45
46
anrIntegration ,
47
+ // eslint-disable-next-line deprecation/deprecation
46
48
disableAnrDetectionForCallback ,
47
49
consoleIntegration ,
48
50
httpIntegration ,
Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ export {
62
62
close ,
63
63
getSentryRelease ,
64
64
createGetModuleFromFilename ,
65
+ // eslint-disable-next-line deprecation/deprecation
65
66
anrIntegration ,
67
+ // eslint-disable-next-line deprecation/deprecation
66
68
disableAnrDetectionForCallback ,
67
69
consoleIntegration ,
68
70
httpIntegration ,
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ export {
42
42
close ,
43
43
getSentryRelease ,
44
44
createGetModuleFromFilename ,
45
+ // eslint-disable-next-line deprecation/deprecation
45
46
anrIntegration ,
47
+ // eslint-disable-next-line deprecation/deprecation
46
48
disableAnrDetectionForCallback ,
47
49
consoleIntegration ,
48
50
httpIntegration ,
Original file line number Diff line number Diff line change @@ -126,34 +126,20 @@ type AnrReturn = (options?: Partial<AnrIntegrationOptions>) => Integration & Anr
126
126
* Detects when the Node.js main thread event loop is blocked for more than the configured
127
127
* threshold (5 seconds by default) and reports these as Sentry events.
128
128
*
129
- * ## How it works
130
- *
131
129
* ANR detection uses a worker thread to monitor the event loop in the main app thread.
132
130
* The main app thread sends a heartbeat message to the ANR worker thread every 50ms by default.
133
131
* If the ANR worker does not receive a heartbeat message for the configured threshold duration,
134
132
* it triggers an ANR event.
135
133
*
136
- * ## Requirements
137
- *
138
134
* - Node.js 16.17.0 or higher
139
135
* - Only supported in the Node.js runtime (not browsers)
140
136
* - Not supported for Node.js clusters
141
137
*
142
- * ## Performance Impact
143
- *
144
138
* Overhead should be minimal:
145
139
* - Main thread: Only polling the ANR worker over IPC every 50ms
146
140
* - Worker thread: Consumes around 10-20 MB of RAM
147
141
* - When ANR detected: Brief pause in debugger to capture stack trace (negligible compared to the blocking)
148
142
*
149
- * ## Configuration Options
150
- *
151
- * - `pollInterval`: Interval to send heartbeat messages (default: 50ms)
152
- * - `anrThreshold`: Threshold in milliseconds to trigger an ANR event (default: 5000ms)
153
- * - `captureStackTrace`: Whether to capture stack traces using the Node.js inspector API (default: false)
154
- * - `maxAnrEvents`: Maximum number of ANR events to send (default: 1)
155
- * - `staticTags`: Tags to include with ANR events
156
- *
157
143
* @example
158
144
* ```javascript
159
145
* Sentry.init({
Original file line number Diff line number Diff line change 5
5
addEventProcessor ,
6
6
addIntegration ,
7
7
amqplibIntegration ,
8
+ // eslint-disable-next-line deprecation/deprecation
8
9
anrIntegration ,
9
10
disableAnrDetectionForCallback ,
10
11
captureCheckIn ,
Original file line number Diff line number Diff line change 8
8
addEventProcessor ,
9
9
addIntegration ,
10
10
amqplibIntegration ,
11
+ // eslint-disable-next-line deprecation/deprecation
11
12
anrIntegration ,
13
+ // eslint-disable-next-line deprecation/deprecation
12
14
disableAnrDetectionForCallback ,
13
15
captureCheckIn ,
14
16
captureConsoleIntegration ,
Original file line number Diff line number Diff line change 8
8
addEventProcessor ,
9
9
addIntegration ,
10
10
amqplibIntegration ,
11
+ // eslint-disable-next-line deprecation/deprecation
11
12
anrIntegration ,
13
+ // eslint-disable-next-line deprecation/deprecation
12
14
disableAnrDetectionForCallback ,
13
15
captureCheckIn ,
14
16
captureConsoleIntegration ,
You can’t perform that action at this time.
0 commit comments