Skip to content

Commit

Permalink
[release-2.9.x] fix: respect query matcher in ingester when getting l…
Browse files Browse the repository at this point in the history
…abel values (#10375) (#11056)
  • Loading branch information
JoaoBraveCoding authored Nov 6, 2023
1 parent db9a8d5 commit b9a7151
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Unreleased

### All Changes

#### Loki

##### Fixes

* [10375](https://github.com/grafana/loki/pull/10375) **trevorwhitney**: Fix ingester query when getting label values by passing matchers

## 2.9.2 (2023-10-16)

### All Changes
Expand Down
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 b9a7151

Please sign in to comment.