Skip to content

Commit

Permalink
fix: respect query matcher in ingester when getting label values (#10375
Browse files Browse the repository at this point in the history
)

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.
  • Loading branch information
trevorwhitney authored Aug 29, 2023
1 parent 145319e commit 85e2e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 85e2e52

Please sign in to comment.