fix(node): standardize flush interval default#4164
Merged
Conversation
This was referenced Jul 16, 2026
Contributor
|
Reviews (1): Last reviewed commit: "fix(node): standardize flush interval de..." | Re-trigger Greptile |
Contributor
posthog-node Compliance ReportDate: 2026-07-16 18:46:11 UTC ✅ All Tests Passed!111/111 tests passed Capture_V1 Tests✅ 94/94 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
Contributor
Contributor
|
Size Change: +116 B (0%) Total Size: 17.5 MB
ℹ️ View Unchanged
|
turnipdabeets
approved these changes
Jul 16, 2026
dustinbyrne
force-pushed
the
fix/node-flush-interval-default
branch
from
July 16, 2026 18:39
66130a7 to
f026e77
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Node.js SDK flushes queued events every 10 seconds by default, while the standardized server-side SDK interval is 5 seconds. This delays delivery for low-volume Node.js processes that do not reach the event-count threshold.
See the server-side SDK event buffer defaults comparison. Related standardization changes: Java server SDK, .NET SDK, and PHP SDK.
Changes
posthog-nodedefaultflushIntervalto 5,000 milliseconds.Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset fileTesting
pnpm turbo --filter=posthog-node... buildpnpm --filter posthog-node exec jest --runInBand(810 passed)pnpm --filter posthog-node exec jest --env @edge-runtime/jest-environment --no-coverage --runInBand(810 passed)pnpm --filter posthog-node lintpnpm --filter posthog-node generate-references🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented with the Pi coding agent as part of a human-directed server-side SDK default standardization. The Node package now overrides only the flush interval; the shared core behavior used by client-side SDKs is unchanged.