Skip to content

Conversation

@darielkremov
Copy link
Contributor

Added Polly to retry failed Event requests, as recommended in .NET docs. As the various client SDKs differ in configuration I've set up a minimal config that can be easily adjusted and extended to more APIs (for example flags, config, etc) if needed. The default settings try to match js/python client configs. We cover batch and capture endpoints for now, but not any of the flags or config endpoints to stay consistent with other clients.
We can easily adjust the exceptions or ApiResult statuses that are being retried if needed, for now it retries ApiException and timeouts, other exceptions throw directly.

A ResiliencePipeline can be passed to new PostHogClient(), if null it will create pipeline with default settings from PostHogOptions, or if no retry needed - ResiliencePipeline.Empty executes the callbacks directly with no extra logic.

Honestly, the added test is a bit more of an integration test than unit, but at least helps verify the behavior and executes quickly.

Closes #7

@darielkremov darielkremov requested a review from haacked as a code owner October 26, 2025 17:39
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

darielkremov and others added 2 commits October 26, 2025 19:42
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@github-actions
Copy link

Hey, this PR has been open for a while. Someone should look at it, or we can just close it if it's no longer relevant

@github-actions github-actions bot added the stale label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retry failed requests

1 participant