Menu
This is documentation for the next version of Loki. For the latest stable release, go to the latest version.
Open source
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:

Getting started with logging and Grafana Loki
See a demo of the updated features in Loki, and how to create metrics from logs and alert on your logs with powerful Prometheus-style alerting rules.

Essential Grafana Loki configuration settings
This webinar focuses on Grafana Loki configuration including agents Promtail and Docker; the Loki server; and Loki storage for popular backends.

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.