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

Log dropped events at the debug level #9251

Merged
merged 6 commits into from
Dec 2, 2018

Conversation

jsoriano
Copy link
Member

Log dropped events to help on cases related to #9212

@jsoriano jsoriano added discuss Issue needs further discussion. review libbeat labels Nov 27, 2018
@jsoriano jsoriano requested a review from urso November 27, 2018 12:29
@ruflin ruflin removed Team:Integrations Label for the Integrations team labels Nov 27, 2018
Copy link

@urso urso left a 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)
Copy link

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.

Copy link
Member Author

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.

@jsoriano jsoriano added the needs_backport PR is waiting to be backported to other branches. label Nov 28, 2018
@jsoriano jsoriano merged commit 1180b37 into elastic:master Dec 2, 2018
@jsoriano jsoriano deleted the log-failed-events branch December 2, 2018 10:27
@jsoriano jsoriano removed the needs_backport PR is waiting to be backported to other branches. label Dec 2, 2018
@jsoriano jsoriano added the v6.6.0 label Dec 2, 2018
jsoriano added a commit to jsoriano/beats that referenced this pull request Dec 2, 2018
Log events dropped by encoding problems at the debug level.

(cherry picked from commit 1180b37)
@jsoriano jsoriano added the v6.5.2 label Dec 2, 2018
jsoriano added a commit to jsoriano/beats that referenced this pull request Dec 2, 2018
Log events dropped by encoding problems at the debug level.

(cherry picked from commit 1180b37)
jsoriano added a commit that referenced this pull request Dec 6, 2018
Log events dropped by encoding problems at the debug level.

(cherry picked from commit 1180b37)
jsoriano added a commit that referenced this pull request Dec 6, 2018
Log events dropped by encoding problems at the debug level.

(cherry picked from commit 1180b37)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Log events dropped by encoding problems at the debug level.

(cherry picked from commit 23a6050)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issue needs further discussion. libbeat review v6.5.2 v6.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants