grafana/loki

Detailed Documentation around Result Caching

Open

#8.895 geöffnet am 24. März 2023

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (3.997 Forks)batch import
help wantedtype/docs

Repository-Metriken

Stars
 (28.187 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 7T 10h) (312 gemergte PRs in 30 T)

Beschreibung

We are trying to understand how the result caching works for metrics queries in Loki and there seems to be not detailed documentation around it.

We did some testing and below are our high-level observation but it would be good to know the expected behaviour so that we can take advantage of the results cache for long duration queries.

  • d1,d2,d3,d4,d5,d6,d7 - queried individualy but tried to query between d1 to d7 it is not using the cache
  • We need to build the cache like d1,d1+d2,d1+d2+d3,d1+d2+d3+d4,d1+d2+d3+d4+d5,d1+d2+d3+d4+d5+d6,d1+d2+d3+d4+d5+d6+d7 and then it works
  1. Detailed documentation of how results query works and best practice around logql to use caching effectively will be helpful
  2. Also logging to indicate if the query is using the cache (full or partial or not using) will be good information to expose.

Contributor Guide