Skip to content

Commit

Permalink
Use predefined variable metricName
Browse files Browse the repository at this point in the history
  • Loading branch information
yoongon committed Jul 22, 2023
1 parent 466bcfb commit b182ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scaling/scale_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit b182ddb

Please sign in to comment.