What are the most important Loki design rules for labels?

IntermediateProductionLog Pipelines
Answer

Loki indexes labels only, not content. Labels define streams; every unique label set is a stream. Keep labels low-cardinality and static: cluster, namespace, app, env, level. Never use user_id, trace_id, pod IP or request path as labels. Put high-cardinality fields in the log body or as structured metadata (Loki 3.x) and filter at query time with | json | trace_id="...". Too many streams cause tiny chunks, high memory and slow queries.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Log Pipelines