feat(reduce transform): Add max_bytes limit to flush groups by size#25405
feat(reduce transform): Add max_bytes limit to flush groups by size#25405saswatamcode wants to merge 3 commits intovectordotdev:masterfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8694c59fab
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
I have read the CLA Document and I hereby sign the CLA |
This commit, - Adds a `max_bytes` option to `reduce` transform. When set, it checks if an incoming event would bring the group's accumulated size over the limit, and if it does, it flushes the current group and starts a new one with the event. If a single event exceeds the limit on its own, it's still emitted as a group of one. - Adds a `byte_limit_flushed_total` counter metric that increments each time a flush is triggered by the byte limit Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8785451d28
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Summary
This commit,
max_bytesoption toreducetransform. When set, it checks if an incoming event would bring the group's accumulated size over the limit, and if it does, it flushes the current group and starts a new one with the event. If a single event exceeds the limit on its own, it's still emitted as a group of one.byte_limit_flushed_totalcounter metric that increments each time a flush is triggered by the byte limitQuite new to Rust here, so would appreciate any feedback!
Vector configuration
How did you test this PR?
Unit tests
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
N/A