fix agg key convert to string error

This commit is contained in:
liugq 2023-06-08 11:01:51 +08:00
parent ce14d82406
commit 282ff24669
1 changed files with 1 additions and 1 deletions

View File

@ -305,7 +305,7 @@ func collectMetricDataOther(agg interface{}, groupValues string, metricData *[]i
if bks, ok := aggM["buckets"].([]interface{}); ok {
for _, bk := range bks {
if bkVal, ok := bk.(map[string]interface{}); ok {
currentGroup := bkVal["key"].(string)
currentGroup := util.ToString(bkVal["key"])
newGroupValues := currentGroup
if groupValues != "" {
newGroupValues = fmt.Sprintf("%s-%s", groupValues, currentGroup)