Why Loki indexes labels and not text

15 min
Audience
beginner who has the lab running (module 1) and has already written a few PromQL queries (module 2)
Duration
30 to 40 min
Module
5/7
Target skill
explain what Loki indexes (the labels), what it does not index (the text of the lines), read the real list of labels and streams of the lab, and say why id_requete must never become a label

In one picture

Imagine a company's archive room. The boxes sit on shelves, and each shelf carries a small tag: "service api · niveau ERROR · code 500". On the shelf, closed boxes, filled with sheets in arrival order. To find the sheet that talks about course C0019, you read the shelf tags (it takes a second, there are about ten), you take the boxes of the right shelf, you open them and you leaf through. Nobody wrote an index of every word of every sheet: that would cost more than the sheets themselves.

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Logs: Loki, Alloy and LogQL” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one