fix: standardize event buffer defaults#262
Merged
Merged
Conversation
5 tasks
Contributor
|
Reviews (1): Last reviewed commit: "chore: standardize event buffer defaults" | Re-trigger Greptile |
Contributor
posthog-dotnet Compliance ReportDate: 2026-07-16 14:21:11 UTC ✅ All Tests Passed!17/17 tests passed Feature_Flags Tests✅ 17/17 tests passed View Details
|
5 tasks
turnipdabeets
approved these changes
Jul 16, 2026
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.
💡 Motivation and Context
The .NET SDK currently buffers 1,000 events, flushes after 20 events or 30 seconds, and caps batch requests at 100 events. Increase the queue to 10,000 events and standardize the flush threshold, maximum batch size, and flush interval at 100 events, 100 events, and 5 seconds respectively. These defaults align with the Python, Ruby, and Rails server-side SDKs, as summarized in the server-side SDK event buffer defaults comparison.
Related changes: Node.js SDK, Java server SDK, and PHP SDK.
💚 How did you test it?
dotnet restore --locked-modebin/fmt --checkdotnet build --configuration Release --no-restore --nologodotnet test tests/UnitTests/UnitTests.csproj --configuration Release --no-build --nologo --framework net8.0(945 passed, 2 skipped)dotnet test tests/UnitTests.AspNetCore/UnitTests.AspNetCore.csproj --configuration Release --no-build --nologo --framework net8.0(49 passed)dotnet test tests/PostHog.AI.Tests/PostHog.AI.Tests.csproj --configuration Release --no-build --nologo --framework net8.0(19 passed)The legacy
netcoreapp3.1test target could not run locally because this arm64 machine does not have the required x64 .NET host; CI will cover that target.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented with the Pi coding agent as part of a human-directed server-side SDK standardization. Updated
PostHogOptions, its XML documentation, configuration/default assertions, and a patch changeset for the corePostHogpackage. The existing 100-event maximum batch size already matched the target and remains unchanged.