-
Notifications
You must be signed in to change notification settings - Fork 5.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
fix: Flush wavefront output sender on error to clean up broken connections #10225
fix: Flush wavefront output sender on error to clean up broken connections #10225
Conversation
… to clean up broken connections
Thanks so much for the pull request! |
!signed-cla |
Thanks so much for the pull request! |
69169c8
to
68f00ef
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.
Thanks for fixing this issue @mikolajprzybysz! One comment about which error to return. What do you think?
w.Log.Errorf("wavefront sending error: %v", err) | ||
return w.sender.Flush() |
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.
To be honest I would prefer
w.Log.Errorf("wavefront sending error: %v", err) | |
return w.sender.Flush() | |
if flushErr := w.sender.Flush(); flushErr != nil { | |
w.Log.Errorf("wavefront flushing error: %v", flushErr) | |
} | |
return err |
as the sending error is the relevant one to return IMO. What do you think?
…e dropping unsent metrics
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.
Looks good to me. Thanks @mikolajprzybysz for the quick fix!
Required for all PRs:
resolves #8812