diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index 3aa71f0589f3..549e483b51d0 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -56,8 +56,8 @@ const anrIntegration = ((options: Partial = {}) => { return { name: INTEGRATION_NAME, setup(client: NodeClient) { - if (NODE_VERSION.major < 16) { - throw new Error('ANR detection requires Node 16 or later'); + if (NODE_VERSION.major < 16 || (NODE_VERSION.major === 16 && NODE_VERSION.minor < 17)) { + throw new Error('ANR detection requires Node 16.17.0 or later'); } // setImmediate is used to ensure that all other integrations have been setup @@ -68,6 +68,8 @@ const anrIntegration = ((options: Partial = {}) => { /** * Starts a thread to detect App Not Responding (ANR) events + * + * ANR detection requires Node 16.17.0 or later */ // eslint-disable-next-line deprecation/deprecation export const Anr = convertIntegrationFnToClass(INTEGRATION_NAME, anrIntegration);