Log errors when write fails, not 200; requires Go 1.13#187
Log errors when write fails, not 200; requires Go 1.13#187bboreham merged 2 commits intoweaveworks:masterfrom
Conversation
See discussion here: cortexproject/cortex#2483 (comment) Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
bboreham
left a comment
There was a problem hiding this comment.
how do they appear in metrics and tracing, after this change?
|
Also: test? |
pracucci
left a comment
There was a problem hiding this comment.
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 <gouthamve@gmail.com>
|
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 gouthamve@gmail.com