github segmentio/analytics-next @segment/analytics-node@3.1.0

6 hours ago

Minor Changes

  • #1342 65951526 Thanks @MichaelGHSeg! - Unify and harden HTTP response handling and retry behavior across browser and node SDKs.

    • Browser (@segment/analytics-next) - Add config-driven response handling for Segment.io delivery (httpConfig with rate-limit/backoff controls). - Improve batching/dispatcher retry semantics for 429 and transient failures. - Use configured protocol for batching requests when apiHost has no scheme, while preserving compatibility for apiHost values that already include http:// or https://.

    • Node (@segment/analytics-node) - Align publisher retry/status behavior with updated response handling rules. - Add maxTotalBackoffDuration and maxRateLimitDuration settings to control retry ceilings. - Update default retry configuration to increase resilience under transient failures.

    • Core (@segment/analytics-core) - Standardize backoff defaults used by retry queues.

Patch Changes

  • #1365 5eb12a17 Thanks @MichaelGHSeg! - Fix closeAndFlush silently dropping in-flight events on timeout.

    • Cancel pending retry sleeps via AbortController when closeAndFlush times out, instead of silently swallowing the timeout error.
    • Raise default closeAndFlush timeout floor to 75s (was 12.5s) so it survives at least one Retry-After: 60 cycle.
    • Add http_response emitter event for observing API response status codes and headers.
  • Updated dependencies [65951526]:

    • @segment/analytics-core@1.8.3

Don't miss a new analytics-next release

NewReleases is sending notifications on new releases.