CloudWatch: Handle log alerts queries where the time field is not the first field (#108277)

CloudWatch: handle log alerts queries where the time field is not the first field
This commit is contained in:
Kevin Yu
2025-07-18 07:29:39 -07:00
committed by GitHub
parent a49b35a7ec
commit f009c2dcdd
+5 -1
View File
@@ -202,8 +202,12 @@ func groupResults(results *data.Frame, groupingFieldNames []string, fromSyncQuer
groupLabels := generateLabels(groupingFields, i)
// set the group key as the display name for sync queries
for j := 1; j < len(newFrame.Fields); j++ {
for j := 0; j < len(newFrame.Fields); j++ {
valueField := newFrame.Fields[j]
// the time field might not be the first field so we check it here and skip the field if it is
if valueField.Type().Time() {
continue
}
if valueField.Config == nil {
valueField.Config = &data.FieldConfig{}
}