Skip to content

Commit

Permalink
Add missed sacledjob error metric value case
Browse files Browse the repository at this point in the history
Signed-off-by: Yoon Park <yoongon.park@gmail.com>
  • Loading branch information
yoongon committed Jan 14, 2024
1 parent 44ffcae commit 8cc29a9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,16 @@ func getErrorMetricsValue(val *prommodel.MetricFamily) float64 {
}
}
}
case "keda_scaledobject_errors_total":

Check failure on line 651 in tests/sequential/opentelemetry_metrics/opentelemetry_metrics_test.go

View workflow job for this annotation

GitHub Actions / Static Checks

duplicate case "keda_scaledobject_errors_total" (constant of type string) in expression switch
metrics := val.GetMetric()
for _, metric := range metrics {
labels := metric.GetLabel()
for _, label := range labels {
if *label.Name == "scaledJbject" && *label.Value == wrongScaledJobName {
return *metric.Counter.Value
}
}
}
case "keda_scaled_job_errors":
metrics := val.GetMetric()
for _, metric := range metrics {
Expand Down

0 comments on commit 8cc29a9

Please sign in to comment.