Observability · Flashcard

What does Loki read when you grep a week of logs?

  • AThe chunks of the streams your labels matched, decompressed and scanned
  • BThe full-text index, which resolves the string to matching entries
  • CEvery chunk in the store, since labels do not narrow a text search
  • DThe compactor's summary table, which records the strings it has seen

Why this is the answer

Loki indexes only the label sets and keeps log content compressed in object storage, so a text search first uses labels to pick streams and then brute-force scans just those chunks — which is why tight label selectors matter so much. There is no full-text index (that is the Elasticsearch trade-off Loki declines), labels do narrow the scan, and the compactor merges index files rather than summarising content.

Official docs
Study in Gnoseed →