From 8818e68e75d4c84fffb4257302cc08eeaf6ee39b Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Fri, 20 Dec 2024 18:00:42 +0800 Subject: [PATCH] fix(monitor): unknown column returned when group by name tag (#21870) --- pkg/monitor/tsdb/models.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/monitor/tsdb/models.go b/pkg/monitor/tsdb/models.go index 8cc93f636f..4ca714b3cd 100644 --- a/pkg/monitor/tsdb/models.go +++ b/pkg/monitor/tsdb/models.go @@ -110,7 +110,7 @@ func FormatRawName(idx int, name string, groupByTags []string, tags map[string]s for _, tagKey := range tagKeys.List() { if tagV, ok := tags[tagKey]; ok { gHint := genHint(tagKey, tagV) - if strings.Contains(tagKey, "name") { + if strings.Contains(tagKey, "name") && !sets.NewString(groupByTags...).Has(tagKey) { hintNames.Insert(gHint) } else { hints.Insert(gHint)