From 6b9317018ec7c9ca3c3dd9d8b846c1628b075973 Mon Sep 17 00:00:00 2001 From: Keiko Oda Date: Tue, 3 Dec 2024 15:34:31 +0900 Subject: [PATCH] Make getFirstMetricValue to return the first value This function was previously returning the last value instead of the first value. This fix changes it and returns the value as soon as reading it. --- input/system/azure/system.go | 1 + 1 file changed, 1 insertion(+) diff --git a/input/system/azure/system.go b/input/system/azure/system.go index 107ba5fb2..30901f3c0 100644 --- a/input/system/azure/system.go +++ b/input/system/azure/system.go @@ -286,6 +286,7 @@ func getFirstMetricValue(metric *azquery.Metric) (metricValue *azquery.MetricVal for _, timeSeriesElement := range metric.TimeSeries { for _, mValue := range timeSeriesElement.Data { metricValue = mValue + return } } return