-
Notifications
You must be signed in to change notification settings - Fork 92
Log errors when write fails, not 200; requires Go 1.13 #187
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
Conversation
See discussion here: cortexproject/cortex#2483 (comment) Signed-off-by: Goutham Veeramachaneni <[email protected]>
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.
how do they appear in metrics and tracing, after this change?
|
Also: test? |
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.
I personally find this code quite tricky. I would be more comfortable if, before merging this, we would have a proof that this code + reverting Cortex PR #2483 would work as expected.
Signed-off-by: Goutham Veeramachaneni <[email protected]>
|
Added a test and also incorporated the feedback.
It would be the same behavior as before unfortunately. |
|
Tested this by vendoring it into Cortex and reverting cortexproject/cortex#2483 Before: After: The new log is more accurate (the status code in this case is not 500), and also doesn't log the duplicate header write golang error. |
See discussion here: cortexproject/cortex#2483 (comment)
Requires projects to use Go 1.13 and above
Signed-off-by: Goutham Veeramachaneni [email protected]