You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alloy has two components for gathering logs which support clustering - loki.source.kubernetes and loki.source.podlogs. In order for those components to divide the work among members of the cluster, they currently hash some of the k8s service discovery labels:
loki.source.kubernetes uses both public and non-public labels, but since Fix logs cluster #1716 it only takes into account some of them.
loki.source.podlogs uses a hash of all the "public" labels (the ones which don't start with __).
It would be better if the only label we use is the one whose value is the pod UID. For example, __meta_kubernetes_pod_uid. This is enough to uniquely identify a pod. If there is no such label, and if clustering is enabled, then no logs should be sent.
Use case
This has a few advantages:
It's safer. A pod UID is guaranteed to identify a pod instance uniquely. There's no possibility of the same pod instance being picked up by several Alloy instances.
It's more performant. No need to extract all the labels and hash them.
No possibility of hash collisions.
Simpler to document and to understand.
The only disadvantage is that it's a breaking change. Some users may need to change their configs.
The text was updated successfully, but these errors were encountered:
Request
Alloy has two components for gathering logs which support clustering -
loki.source.kubernetes
andloki.source.podlogs
. In order for those components to divide the work among members of the cluster, they currently hash some of the k8s service discovery labels:loki.source.kubernetes
uses both public and non-public labels, but since Fix logs cluster #1716 it only takes into account some of them.loki.source.podlogs
uses a hash of all the "public" labels (the ones which don't start with__
).It would be better if the only label we use is the one whose value is the pod UID. For example,
__meta_kubernetes_pod_uid
. This is enough to uniquely identify a pod. If there is no such label, and if clustering is enabled, then no logs should be sent.Use case
This has a few advantages:
The only disadvantage is that it's a breaking change. Some users may need to change their configs.
The text was updated successfully, but these errors were encountered: