Skip to content
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

GELF codec needs to support chunking #13292

Open
neuronull opened this issue Jun 22, 2022 · 8 comments
Open

GELF codec needs to support chunking #13292

neuronull opened this issue Jun 22, 2022 · 8 comments
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) type: enhancement A value-adding code change that enhances its existing functionality.

Comments

@neuronull
Copy link
Contributor

neuronull commented Jun 22, 2022

I'm noticing that GELF does have a chunking part of its protocol too, for multi-part messages when using UDP:

Prepend the following structure to your GELF message to make it chunked:

Chunked GELF magic bytes - 2 bytes: 0x1e 0x0f
Message ID - 8 bytes: Must be the same for every chunk of this message. Identifying the whole message and is used to reassemble the chunks later. Generate from millisecond timestamp + hostname for example.
Sequence number - 1 byte: The sequence number of this chunk. Starting at 0 and always less than the sequence count.
Sequence count - 1 byte: Total number of chunks this message has.
All chunks MUST arrive within 5 seconds or the server will discard all already arrived and still arriving chunks. A message MUST NOT consist of more than 128 chunks.

I think we can split this off into a follow up issue though and just start with basic decoding support of incoming messages.

Originally posted by @jszwedko in #13288 (comment)

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@neuronull neuronull added the domain: codecs Anything related to Vector's codecs (encoding/decoding) label Jun 22, 2022
@neuronull
Copy link
Contributor Author

This should be attempted after #4868 is closed.

@jszwedko jszwedko added the type: enhancement A value-adding code change that enhances its existing functionality. label Jun 23, 2022
@paluchnuggets
Copy link

Any update on this matter?

@neuronull
Copy link
Contributor Author

Any update on this matter?

👋 I've added it to our backlog. It currently doesn't have a high priority essentially due to not knowing how important it is to the community.

Please vote on this issue by adding a +1 reaction to the original comment on this issue to add your vote to prioritization. Thanks!

@angelrib
Copy link

angelrib commented Dec 1, 2022

@neuronull

I think we can split this off into a follow up issue though and just start with basic decoding support of incoming messages.

Does vector support chunking for output messages now? Or what you mean is start with the reassembling first?

Thank you

@neuronull
Copy link
Contributor Author

Hi @angelrib , that comment actually came from @jszwedko (#13288 (comment))

So this (#13292) is the referred to follow-up issue to track chunking support.

I believe what Jesse meant is that we can probably just start with implementing chunking on the decoder side, and add the encoding side in a separate PR.

@angelrib
Copy link

angelrib commented Dec 1, 2022

Reviewing the code it looked like that, I just wanted to confirm it. Thank you very much!

@gernoteger
Copy link

Chunking imho is mandatory for UDP in order to be usable, since log messages would be limited to 8192 bytes otherwise, and fail depending on content.
Currently GELF is implemented as an encoding for various transports. Chunked GELF UDP has aspects of a transport protocol, like dependencies on packets and a defined timeout for a sequence. Maybe this would need dedicated source and sink components.

@jorgehermo9
Copy link

Opened #20769 for addressing the decoding part. I'm currently working on it and will have it implemented soon. Just some details left

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
Development

No branches or pull requests

6 participants