In my discovery.relabel “kubernetes_pods”, I add the pod name as a label:
rule {
source_labels = \["\__meta_kubernetes_pod_name"\]
target_label = "pod"
}
I would prefer instead to add this as a json label to my log, and drop this pod label (due to high cardinality). I would think I can do this in loki.process, but so far I’ve had no luck with this.
Thanks!