-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add shared drain pipeline for batching and retry #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for following the naming conventions! 🙏 |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds a new shared drain “pipeline” to evlog to support buffered batching with retry semantics, and updates several drains and the playground to exercise batch delivery.
Changes:
- Add
createDrainPipeline(buffering + batch flush on size/interval + retry/backoff + overflow dropping) and export it asevlog/pipeline. - Update Axiom/PostHog/Sentry drains to accept batched contexts and send via new batch senders.
- Add Vitest coverage for batching/retry/overflow/flush behaviors and add a playground UI section to trigger pipeline batching.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/evlog/tsdown.config.ts | Adds pipeline build entry so it’s emitted to dist. |
| packages/evlog/src/pipeline.ts | Introduces the batching/retry pipeline implementation and its public API. |
| packages/evlog/test/pipeline.test.ts | Adds tests for batching, interval flush, retry strategies, buffer overflow, and flush/pending. |
| packages/evlog/src/adapters/axiom.ts | Updates drain to accept batch inputs and uses batch sender. |
| packages/evlog/src/adapters/posthog.ts | Updates drain to accept batch inputs and uses batch sender. |
| packages/evlog/src/adapters/sentry.ts | Updates drain to accept batch inputs and uses batch sender. |
| packages/evlog/package.json | Exposes ./pipeline via exports/typesVersions. |
| apps/playground/app/pages/index.vue | Adds a UI action to fire 10 requests in parallel for batching. |
| apps/playground/app/config/tests.config.ts | Adds a “Pipeline” test section to the playground UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
This pull request introduces a new batching and retry pipeline for event drains in the
evlogpackage, enabling efficient, configurable buffering and delivery of events to external services. It updates the Axiom, PostHog, and Sentry adapters to support batch delivery, adds comprehensive tests for the new pipeline, and integrates the pipeline into the playground app for interactive testing.