Menu
Enterprise
labeldrop
The labeldrop stage is an action stage that drops labels from the label set that is sent to Loki with the log entry.
Schema
yaml
labeldrop:
- [<string>]
...
Examples
For the given pipeline:
yaml
- replace:
expression: "(.*)"
replace: "pod_name:{{ .kubernetes_pod_name }} {{ .Value }}"
- labeldrop:
- kubernetes_pod_name
Given the following log line:
log message\n
The first stage would append the value of thekubernetes_pod_name
label into the beginning of the log line.
The labeldrop stage would drop the label from being sent to Loki, and it would now be part of the log line instead.
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video
Scaling and securing your logs with Grafana Loki
This webinar covers the challenges of scaling and securing logs, and how Grafana Enterprise Logs powered by Grafana Loki can help, cost-effectively.
Video
Managing privacy in log data with Grafana Loki
Laws for data privacy are complex and rapidly changing. During this webinar, we will show how Grafana Loki can help organizations meet these requirements.