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.
More on Logging: ELK/EFK, Loki & Log Shippers
What is the ELK stack, and what is EFK?BeginnerHow does Elasticsearch store and search logs?IntermediateWhat is ILM (Index Lifecycle Management) and why do log clusters need it?IntermediateWhat is an Elasticsearch data stream?AdvancedWhat is an index template and mapping, and what is a mapping explosion?AdvancedWhat does Logstash do compared with Beats?Intermediate