Interview Prep/Monitoring & Observability/Logging: ELK/EFK, Loki & Log Shippers

What is a Loki stream, and why does label cardinality matter?

IntermediateConceptLogging: ELK/EFK, Loki & Log Shippers
Answer

A stream is a unique combination of labels; each stream has its own chunks. High-cardinality labels (user_id, trace_id, request_id, pod_ip) create millions of tiny streams and chunks, wrecking ingestion and query performance and hitting stream limit exceeded / max streams per user limits.

Keep labels to low-cardinality, bounded values. Put high-cardinality fields in the log line or in structured metadata (Loki 3.x), and filter with LogQL at query time.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: ELK/EFK, Loki & Log Shippers