From b182ddb340ad421f738d326ab47c63519b6c3d12 Mon Sep 17 00:00:00 2001 From: Yoon Park Date: Sat, 22 Jul 2023 16:11:35 +0900 Subject: [PATCH] Use predefined variable metricName --- pkg/scaling/scale_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scaling/scale_handler.go b/pkg/scaling/scale_handler.go index 49ec3aa690d..db3f0423c00 100644 --- a/pkg/scaling/scale_handler.go +++ b/pkg/scaling/scale_handler.go @@ -653,7 +653,7 @@ func (h *scaleHandler) getScaledJobMetrics(ctx context.Context, scaledJob *kedav } metricName := spec.External.Metric.Name - metrics, isTriggerActive, latency, err := cache.GetMetricsAndActivityForScaler(ctx, scalerIndex, spec.External.Metric.Name) + metrics, isTriggerActive, latency, err := cache.GetMetricsAndActivityForScaler(ctx, scalerIndex, metricName) if latency != -1 { prommetrics.RecordScalerLatency(scaledJob.Namespace, scaledJob.Name, scalerName, scalerIndex, metricName, float64(latency)) }