unstale

npm / @segment/analytics-node

@segment/analytics-node

What changed in @segment/analytics-node 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.

3 breaking4 new APIs and options3 behavior and defaults1 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.4 on npm

@segment/analytics-node 38 changes

Breaking changes 1

  • The package requires Node.js 20 or later, so applications using it must run on a supported Node.js version.

    3.0.0release notes

New APIs and options 3

  • Adds an emitter event for observing API response status codes and headers.

    3.1.0release notes

  • Adds a setting to control the rate-limit retry ceiling.

    3.1.0release notes

  • Adds a setting to control the total retry backoff ceiling.

    3.1.0release notes

Behavior and default changes 3

  • Raises the default timeout floor to 75 seconds from 12.5 seconds so it survives at least one Retry-After: 60 cycle.

    3.1.0release notes

  • Aligns publisher retry and status behavior with updated response handling rules.

    3.1.0release notes

  • Updates the default retry configuration to increase resilience under transient failures.

    3.1.0release notes

Fixes and other changes 1

  • Cancels pending retry sleeps with AbortController when the call times out, instead of silently swallowing the timeout error and dropping in-flight events.

    3.1.0release notes

@segment/analytics-node 23 changes

Breaking changes 2

  • For custom HTTPClient implementations, the data field changed to body, which is a string; data processing now occurs before calls to makeRequest.

    2.0.0release notes

  • Support for Node.js 14 and 16 was removed because they are EOL.

    2.0.0release notes

New APIs and options 1

  • Segment OAuth2 is supported through the new OAuthSettings type, which can be provided in Analytics configuration.

    2.0.0release notes