Skip to content

Commit eb77f15

Browse files
Rustamchukru.nazarov
andauthored
api bug string top mapping int value (#2055)
Co-authored-by: ru.nazarov <[email protected]>
1 parent 3138b5d commit eb77f15

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

internal/api/handler.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,9 +1112,12 @@ func (h *requestHandler) resolveFilter(metricMeta *format.MetricMetaValue, versi
11121112
continue // we only support production tables for v1
11131113
}
11141114
if k == format.StringTopTagID {
1115-
stringTop := &m.Tags[format.StringTopTagIndexV3]
1116-
for _, val := range values {
1117-
stringTop.Values = append(stringTop.Values, data_model.NewTagValueS(val))
1115+
for _, v := range values {
1116+
if f, err := h.GetTagFilter(metricMeta, format.StringTopTagIndexV3, v); err != nil {
1117+
return data_model.TagFilters{}, err
1118+
} else {
1119+
m.Append(format.StringTopTagIndexV3, f)
1120+
}
11181121
}
11191122
} else if tag := metricMeta.Name2Tag(k); tag != nil {
11201123
for _, v := range values {

0 commit comments

Comments
 (0)