Log error at HTTP response close#9
Conversation
|
Thanks, @dentiny. We log errors while reading the response body, but we don’t really care about errors that occur when closing the body. Do you have any experience suggesting that they can be helpful? |
My general practice is don't ignore error in all cases; logging, propagation, crash are all strictly better than ignore. |
And how can that log be helpful in this case? |
According to the USE method, error logging is one of the items we need to check first. The logging here helps people understand what was going wrong in the system. |
It doesn't talk about application logs, but instead talk about metrics provided by the operation system. Those metrics are indeed a better source for monitoring TCP efficiency, including reconnections.
Aren't the error logs while reading the response body enough? Here: Line 134 in 0dcce9b |
I understand we don't want to (and it's not easy to) propagate error at function return, but at least we could log it out for easier debugging if something goes wrong.