From 85e2e52279ecac6dc111d5c113c54d6054d2c922 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 29 Aug 2023 11:47:33 -0600 Subject: [PATCH] fix: respect query matcher in ingester when getting label values (#10375) There is a bug when passing a query parameter to the `/label/:label/values`. Currently the ingester is not respecting this query string, and so is always returning all label values. This PR fixes that bug. --- pkg/ingester/ingester.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index 42e609dd9e..dd89ece952 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -1081,7 +1081,7 @@ func (i *Ingester) Label(ctx context.Context, req *logproto.LabelRequest) (*logp from, through := model.TimeFromUnixNano(start.UnixNano()), model.TimeFromUnixNano(req.End.UnixNano()) var storeValues []string if req.Values { - storeValues, err = cs.LabelValuesForMetricName(ctx, userID, from, through, "logs", req.Name) + storeValues, err = cs.LabelValuesForMetricName(ctx, userID, from, through, "logs", req.Name, matchers...) if err != nil { return nil, err }