From d823adb538bdd1b63c3443bcc09bad20b41374f9 Mon Sep 17 00:00:00 2001 From: Arunesh Dwivedi Date: Fri, 9 Oct 2026 06:16:27 +0530 Subject: [PATCH] fix(metrics): rename workload label to name in canary_weight metric The canary_weight gauge was defined with labels ['workload', 'namespace'] but SetWeight() passes cd.Spec.TargetRef.Name which semantically is the canary 'name'. This caused a label mismatch where users could not filter by canary name in Prometheus. Signed-off-by: Arunesh Dwivedi --- pkg/metrics/recorder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/metrics/recorder.go b/pkg/metrics/recorder.go index 85e4d6e0a..fba24e589 100644 --- a/pkg/metrics/recorder.go +++ b/pkg/metrics/recorder.go @@ -94,7 +94,7 @@ func NewRecorder(controller string, register bool) Recorder { Subsystem: controller, Name: "canary_weight", Help: "The virtual service destination weight current value", - }, []string{"workload", "namespace"}) + }, []string{"name", "namespace"}) analysis := prometheus.NewGaugeVec(prometheus.GaugeOpts{ Subsystem: controller,