Skip to content

Commit

Permalink
Make getFirstMetricValue to return the first value
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
keiko713 committed Dec 3, 2024
1 parent 1b330c2 commit 6b93170
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions input/system/azure/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b93170

Please sign in to comment.