Loki label best practices
Picking static, bounded labels such as cluster, namespace and environment, using dynamic labels sparingly, and filtering on content instead of labelling it, so streams and chunks stay healthy.

Choosing the labels that make Loki fast and affordable, and handling high-cardinality data with structured metadata and stream sharding.
Picking static, bounded labels such as cluster, namespace and environment, using dynamic labels sparingly, and filtering on content instead of labelling it, so streams and chunks stay healthy.
Finding labels that explode the number of streams, such as pod names, user IDs or trace IDs, the default limit of 15 index labels, and moving those values to structured metadata or line filters.
Attaching high-cardinality fields such as trace IDs and pod names to log lines without indexing them: schema v13 and TSDB requirements, querying structured metadata and its role in bloom acceleration.
Adjusting which OTLP resource attributes Loki promotes to index labels: why Grafana no longer recommends k8s.pod.name and service.instance.id as labels, and moving them to structured metadata per tenant.
Keeping busy streams under the per-stream rate limit by letting Loki split them: the desired_rate setting, defaults relative to per_stream_rate_limit, and checking whether sharding is working.
Understanding the service_name label Loki 3.0 added for every stream: where its value comes from, how Grafana uses it for exploration, and configuring it for logs that do not carry a service name.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.