-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
fluentd log driver. failed parse last partial message in fluentd #38951 #38952
Conversation
ping @anusha-ragunathan ptal |
FYI, you can also check for The idea of this PR LGTM. The last message in a series of partial messages should not be flagged as |
@@ -163,7 +163,7 @@ func (f *fluentd) Log(msg *logger.Message) error { | |||
for k, v := range f.extra { | |||
data[k] = v | |||
} | |||
if msg.PLogMetaData != nil { | |||
if msg.PLogMetaData != nil && !msg.PLogMetaData.Last { | |||
data["partial_message"] = "true" |
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.
While we are here, lets also add the missing fields in the data
map.
data["partial_ordinal"] = strconv.Itoa(msg.PLogMetaData.Ordinal)
data["partial_last"] = strconv.FormatBool(msg.PLogMetaData.Last)```
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.
This is already taken care of by https://github.com/moby/moby/pull/38065/files, but CI is broke on that. You can carry over this specific change from that PR.
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.
Yes, well, this approach is much better
experimental failed with unrelated test failure. Is this a flaky test @thaJeztah ?
|
doesn't look related no; retriggered ci |
Codecov Report
@@ Coverage Diff @@
## master #38952 +/- ##
==========================================
+ Coverage 36.89% 37.32% +0.42%
==========================================
Files 612 612
Lines 45332 45846 +514
==========================================
+ Hits 16727 17113 +386
- Misses 26319 26393 +74
- Partials 2286 2340 +54 |
…y#38951 Signed-off-by: Alexei Margasov <alexei38@yandex.ru>
My commit is not related to build issues. |
ping @cpuguy83 @anusha-ragunathan ptal |
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.
LGTM, thanks!
ping @anusha-ragunathan ptal
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.
LGTM
I use fluentd logging driver
In my containers the log it is more than 16 kb
Such the log are marked with partial_message flag
fluent-plugin-concat waited for the message which came without partial_message from stopped to stick together the message for further transfer
Signed-off-by: Alexei Margasov alexei38@yandex.ru