From 31e3a1fea48503cff1f3af957208beb70a3396c8 Mon Sep 17 00:00:00 2001 From: Zihan Jiang Date: Fri, 13 Oct 2023 11:07:33 -0700 Subject: [PATCH] fix incorrect counter name (#409) * fix incorrect counter name * add failure reason --- controllers/common/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/common/metrics.go b/controllers/common/metrics.go index 78dc2a3f..00fd281b 100644 --- a/controllers/common/metrics.go +++ b/controllers/common/metrics.go @@ -92,7 +92,7 @@ func (c *MetricsCollector) IncSuccess(instanceGroup string) { } func (c *MetricsCollector) IncFail(instanceGroup, reason string) { - c.successCounter.With(prometheus.Labels{"instancegroup": instanceGroup}).Inc() + c.failureCounter.With(prometheus.Labels{"instancegroup": instanceGroup, "reason": reason}).Inc() } func (c *MetricsCollector) IncThrottle(serviceName, operationName string) {