app/vlinsert/syslog: preserve multiline messages in datagrams#1590
Open
func25 wants to merge 1 commit into
Open
app/vlinsert/syslog: preserve multiline messages in datagrams#1590func25 wants to merge 1 commit into
func25 wants to merge 1 commit into
Conversation
func25
commented
Jul 10, 2026
Comment on lines
+45
to
+51
| framingUDP = flagutil.NewArrayString("syslog.framing.udp", "Message framing for the corresponding -syslog.listenAddr.udp. "+ | ||
| "Supported values: datagram, newline. The default datagram mode treats every UDP packet as a single Syslog message. "+ | ||
| "The newline mode splits every UDP packet into messages delimited by newline characters. See https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#message-framing") | ||
| framingUnix = flagutil.NewArrayString("syslog.framing.unix", "Message framing for SOCK_DGRAM Unix sockets at the corresponding -syslog.listenAddr.unix. "+ | ||
| "Supported values: datagram, newline. The default datagram mode treats every packet as a single Syslog message. "+ | ||
| "The newline mode splits every packet into messages delimited by newline characters. This flag doesn't apply to SOCK_STREAM Unix sockets. "+ | ||
| "See https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#message-framing") |
Member
Author
There was a problem hiding this comment.
- I made
datagramframing as default, it changes the current behavior, - as I think it is unlikely that users rely on newlines to separate multiple messages within a single UDP packet. Though I dont have enough context to be certain, so kept backward compat through these flags, but feel free to remove them to simplify the code (and docs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1573
UDP and unixgram listeners currently split syslog messages at newlines, it breaks valid multiline messages. For UDP, this documented behavior violates RFC 5426 and does not match typical user expectations.
So this change treats each datagram as a single message by default and adds a
newlineframing option for backward compatibility.