grafana / explore-logs

Repo for the Loki log exploration app
GNU Affero General Public License v3.0
310 stars 14 forks source link

Shard query splitting: send the whole stream selector to fetch shard values #782

Closed matyax closed 2 months ago

matyax commented 2 months ago

Seen in some recent tests in ops, where with filters applied that generated a new stream selector, we were getting all the shard values instead of those that correspond to that particular query.

gtk-grafana commented 2 months ago

Looks good, and things appear to work, but I'm not exactly sure how to test?

matyax commented 2 months ago

Good call! Could have added repro instructions. Basically, apply a label filter and the values call should use it in its payload. Depending to the data and time range, it would return different shards to query (or not). The important piece is to send the whole stream selector to /values, not just the service.