metrics: Add canceled requests (#11881)

Add metric for canceled requests
This commit is contained in:
Klaus Post
2021-03-24 18:25:27 +01:00
committed by GitHub
parent 410e84d273
commit 749e9c5771
5 changed files with 44 additions and 1 deletions

View File

@@ -372,6 +372,18 @@ func httpMetricsPrometheus(ch chan<- prometheus.Metric) {
api,
)
}
for api, value := range httpStats.TotalS3Canceled.APIStats {
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName(s3Namespace, "canceled", "total"),
"Total number of client canceled s3 request in current MinIO server instance",
[]string{"api"}, nil),
prometheus.CounterValue,
float64(value),
api,
)
}
}
// collects network metrics for MinIO server in Prometheus specific format