In case using httputil.ReverseProxy, the error returned by RoundTrip(), is only recorded by Logger. https://github.com/golang/go/blob/master/src/net/http/httputil/reverseproxy.go#L203 .
Therefore, it seems the HTTPProxy cannot distinguish whether it is a timeout or a normal response, when it tries to gather the metrics. https://github.com/fabiolb/fabio/blob/master/proxy/http_proxy.go#L134
Also, the backend service timeout causes the response have 502 code and without body. And the body cannot be customized right now. The worst is timeout error is not logged with enough context information, for example, which service or which URI gets timeout.
In case using
httputil.ReverseProxy, the error returned by RoundTrip(), is only recorded by Logger. https://github.com/golang/go/blob/master/src/net/http/httputil/reverseproxy.go#L203 .Therefore, it seems the HTTPProxy cannot distinguish whether it is a timeout or a normal response, when it tries to gather the metrics. https://github.com/fabiolb/fabio/blob/master/proxy/http_proxy.go#L134
Also, the backend service timeout causes the response have 502 code and without body. And the body cannot be customized right now. The worst is timeout error is not logged with enough context information, for example, which service or which URI gets timeout.