fix agg key convert to string error
This commit is contained in:
parent
ce14d82406
commit
282ff24669
|
@ -305,7 +305,7 @@ func collectMetricDataOther(agg interface{}, groupValues string, metricData *[]i
|
||||||
if bks, ok := aggM["buckets"].([]interface{}); ok {
|
if bks, ok := aggM["buckets"].([]interface{}); ok {
|
||||||
for _, bk := range bks {
|
for _, bk := range bks {
|
||||||
if bkVal, ok := bk.(map[string]interface{}); ok {
|
if bkVal, ok := bk.(map[string]interface{}); ok {
|
||||||
currentGroup := bkVal["key"].(string)
|
currentGroup := util.ToString(bkVal["key"])
|
||||||
newGroupValues := currentGroup
|
newGroupValues := currentGroup
|
||||||
if groupValues != "" {
|
if groupValues != "" {
|
||||||
newGroupValues = fmt.Sprintf("%s-%s", groupValues, currentGroup)
|
newGroupValues = fmt.Sprintf("%s-%s", groupValues, currentGroup)
|
||||||
|
|
Loading…
Reference in New Issue