Skip to content

Commit

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

#### Loki

##### Fixes

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

### All Changes

## 2.8.6 (2023-10-17)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,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 a64f16d

Please sign in to comment.