fixed fetch data panic when group field type is number

This commit is contained in:
liugq 2022-08-10 14:16:37 +08:00
parent 074663f1be
commit 35b01d6645
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ func collectMetricData(agg interface{}, groupValues string, metricData *[]insigh
if bks, ok := vm["buckets"].([]interface{}); ok {
for _, bk := range bks {
if bkVal, ok := bk.(map[string]interface{}); ok {
currentGroup := bkVal["key"].(string)
var currentGroup = fmt.Sprintf("%v", bkVal["key"])
newGroupValues := currentGroup
if groupValues != "" {
newGroupValues = fmt.Sprintf("%s-%s", groupValues, currentGroup)