Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/node/src/integrations/anr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const anrIntegration = ((options: Partial<Options> = {}) => {
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
Expand All @@ -68,6 +68,8 @@ const anrIntegration = ((options: Partial<Options> = {}) => {

/**
* 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);
Expand Down