File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
packages/node/src/integrations/anr Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
import type { Contexts , DsnComponents , Primitive , SdkMetadata } from '@sentry/core' ;
2
2
3
+ /**
4
+ * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.
5
+ */
3
6
export interface AnrIntegrationOptions {
4
7
/**
5
8
* Interval to send heartbeat messages to the ANR worker.
@@ -39,6 +42,9 @@ export interface AnrIntegrationOptions {
39
42
appRootPath : string | undefined ;
40
43
}
41
44
45
+ /**
46
+ * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.
47
+ */
42
48
export interface WorkerStartData extends AnrIntegrationOptions {
43
49
debug : boolean ;
44
50
sdkMetadata : SdkMetadata ;
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ import type { AnrIntegrationOptions, WorkerStartData } from './common';
19
19
20
20
const { isPromise } = types ;
21
21
22
+ /**
23
+ * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.
24
+ */
22
25
// This string is a placeholder that gets overwritten with the worker code.
23
26
export const base64WorkerScript = '###AnrWorkerScript###' ;
24
27
@@ -116,6 +119,9 @@ const _anrIntegration = ((options: Partial<AnrIntegrationOptions> = {}) => {
116
119
117
120
type AnrReturn = ( options ?: Partial < AnrIntegrationOptions > ) => Integration & AnrInternal ;
118
121
122
+ /**
123
+ * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.
124
+ */
119
125
export const anrIntegration = defineIntegration ( _anrIntegration ) as AnrReturn ;
120
126
121
127
/**
@@ -230,6 +236,7 @@ export function disableAnrDetectionForCallback<T>(callback: () => T): T;
230
236
export function disableAnrDetectionForCallback < T > ( callback : ( ) => Promise < T > ) : Promise < T > ;
231
237
/**
232
238
* Disables ANR detection for the duration of the callback
239
+ * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.
233
240
*/
234
241
export function disableAnrDetectionForCallback < T > ( callback : ( ) => T | Promise < T > ) : T | Promise < T > {
235
242
const integration = getClient ( ) ?. getIntegrationByName ( INTEGRATION_NAME ) as AnrInternal | undefined ;
You can’t perform that action at this time.
0 commit comments