CloudWatch: Expand dimension value in alias correctly (#21626)

* Make sure dimension value is being returned, and not just label

* Fix typo
This commit is contained in:
Erik Sundell
2020-01-20 18:51:32 +01:00
committed by GitHub
parent 5f332682ec
commit a1733bb412
3 changed files with 16 additions and 7 deletions

View File

@@ -100,8 +100,10 @@ func parseGetMetricDataTimeSeries(metricDataResults map[string]*cloudwatch.Metri
series.Tags[key] = values[0]
} else {
for _, value := range values {
if value == label || value == "*" || strings.Contains(label, value) {
if value == label || value == "*" {
series.Tags[key] = label
} else if strings.Contains(label, value) {
series.Tags[key] = value
}
}
}