-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Log dropped events at the debug level #9251
Conversation
0c2e669
to
9748535
Compare
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.
It's no big change, but a changelog would be nice.
return func(event interface{}) (d []byte, err error) { | ||
d, err = enc.Encode(index, event.(*beat.Event)) | ||
if err != nil { | ||
debugf("Failed to encode event: %v", event) |
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.
We should still include an error log here, as we have for the other outputs. Otherwise it's most likely to get unnoticed.
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.
There are already errors logged for all events failures for both implementations (sync and async). But I wanted to add debug logging only for events failed to encode, and unlike the other outputs, on this one it is not easy to differentiate if it was an encoding event at the point where the general message is logged. This is why I add this debug message here.
Log events dropped by encoding problems at the debug level. (cherry picked from commit 1180b37)
Log events dropped by encoding problems at the debug level. (cherry picked from commit 1180b37)
Log events dropped by encoding problems at the debug level. (cherry picked from commit 23a6050)
Log dropped events to help on cases related to #9212