requester: Remove httpclient.Do errors from latency measurement (#1072)

* remove httpclient.Do errors from latency measurement

* fix an oopsie
This commit is contained in:
E Sequeira
2022-11-02 04:51:41 +00:00
committed by GitHub
parent c4385af13f
commit c2d45635a9

View File

@@ -165,7 +165,7 @@ func (r *Requester) doRequest(ctx context.Context, endpoint EndpointLimit, newRe
resp, err := r._HTTPClient.do(req)
if r.reporter != nil {
if r.reporter != nil && err == nil {
r.reporter.Latency(r.name, p.Method, p.Path, time.Since(start))
}