chore: add status code for request_total metrics (#5188)

This commit is contained in:
Konstantin Lebedev
2024-01-10 23:05:27 +05:00
committed by GitHub
parent fe417ee02d
commit a7fc723ae0
16 changed files with 101 additions and 66 deletions

View File

@@ -329,7 +329,7 @@ func upload_content(fillBufferFunction func(w io.Writer) error, originalDataSize
if strings.Contains(post_err.Error(), "connection reset by peer") ||
strings.Contains(post_err.Error(), "use of closed network connection") {
glog.V(1).Infof("repeat error upload request %s: %v", option.UploadUrl, postErr)
stats.FilerRequestCounter.WithLabelValues(stats.RepeatErrorUploadContent).Inc()
stats.FilerHandlerCounter.WithLabelValues(stats.RepeatErrorUploadContent).Inc()
resp, post_err = HttpClient.Do(req)
defer util.CloseResponse(resp)
}