-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(codecs): Support GELF chunking for encoding #23728
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
feat(codecs): Support GELF chunking for encoding #23728
Conversation
This reverts commit 3a5712f.
@pront (Sorry for the nudge) is there any chance this could get reviewed before the merge freeze for 0.50? Thanks 😊 |
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.
Hi @aramperes, this PR looks good to me. Left a few comments, but nothing major.
A few checks are failing. We can merge once those are fixed. |
Head branch was pushed to by a user without write access
Summary
Implements the GELF Chunking specification when the
gelf
codec is used with thesocket
sink inudp
mode. This increases the possible message size from 8KiB to 1MiB to Graylog UDP server, and up to 8MiB when used to bridge to another Vector instance over UDP.Implementation notes
Chunking
trait can be used to implement any chunking method. It requires the contractchunk(Bytes) -> Vec<Bytes>
Chunking
implementation (Chunker
) to the UDP sink is optional, as to skip aVec
heap allocation when chunking is not needed, with the goal of maintaining performance for all other codecs that do not use chunking.Chunking
is only ever called for thesocket
sink in UDP mode, but this could later be supported by any other sink that could benefit from it.Vector configuration
Client side Vector (sink):
Server side Vector (source):
How did you test this PR?
Tested using the configs above, Vector-to-Vector. Confirmed that data sent through the "client" Vector (gelf sink) is replicated on the "server" side Vector (gelf source).
My main motivation for implementing this feature is to support Vector-to-Vector event bridging over UDP, for events larger than 64KiB.
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changelog
label to this PR.References