In this case the pod name should not be used as a label. This causes high cardinality for the labels which will slow down Loki.
You can still include it as a field in the log line. It can then be filtered on at run time. Loki was built to handle this use case so it’s not as inefficient as it appears.
Can you clarify what types of queries you want to run?
I think this is confusing because the default behavior is to use pod name as label, so if there aren’t many shot lived pods in cluster, it’s ok to use it?
I had the same query. If you don’t use the pod name as a label.
Lets say there are multiple pods running on different machines with the same app label. Then all the logs of these pods would be appended to the same stream. As the machines are different there is a possibility that there is a few millisecond time differences between them. Then there is a chance that the logs generated would be marked as out of order by loki.