mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
parent
e106070640
commit
18338d60d5
@ -178,8 +178,8 @@ func (st *HTTPStats) toServerHTTPStats() ServerHTTPStats {
|
|||||||
|
|
||||||
// Update statistics from http request and response data
|
// Update statistics from http request and response data
|
||||||
func (st *HTTPStats) updateStats(api string, r *http.Request, w *logger.ResponseWriter) {
|
func (st *HTTPStats) updateStats(api string, r *http.Request, w *logger.ResponseWriter) {
|
||||||
// A successful request has a 2xx response code
|
// A successful request has a 2xx response code or < 4xx response
|
||||||
successReq := w.StatusCode >= 200 && w.StatusCode < 300
|
successReq := w.StatusCode >= 200 && w.StatusCode < 400
|
||||||
|
|
||||||
if !strings.HasSuffix(r.URL.Path, prometheusMetricsPathLegacy) ||
|
if !strings.HasSuffix(r.URL.Path, prometheusMetricsPathLegacy) ||
|
||||||
!strings.HasSuffix(r.URL.Path, prometheusMetricsV2ClusterPath) ||
|
!strings.HasSuffix(r.URL.Path, prometheusMetricsV2ClusterPath) ||
|
||||||
@ -189,7 +189,7 @@ func (st *HTTPStats) updateStats(api string, r *http.Request, w *logger.Response
|
|||||||
switch w.StatusCode {
|
switch w.StatusCode {
|
||||||
case 0:
|
case 0:
|
||||||
case 499:
|
case 499:
|
||||||
// 499 is a good error, shall be counted at canceled.
|
// 499 is a good error, shall be counted as canceled.
|
||||||
st.totalS3Canceled.Inc(api)
|
st.totalS3Canceled.Inc(api)
|
||||||
default:
|
default:
|
||||||
st.totalS3Errors.Inc(api)
|
st.totalS3Errors.Inc(api)
|
||||||
|
Loading…
Reference in New Issue
Block a user