labeldrop
stage
The labeldrop stage is an action stage that drops labels from the label set that is sent to Loki with the log entry.
Schema
labeldrop:
- [<string>]
...
Examples
For the given pipeline:
- 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.
Related Loki resources
Getting started with logging and Grafana Loki (APAC timezone)
Join this webinar to learn why correlating metrics and logs is critical across the development lifecycle, and how Loki helps reduce logging costs and operations overhead.
Logging with Loki: Essential configuration settings
This webinar focuses on Grafana Loki configuration including agents Promtail and Docker; the Loki server; and Loki storage for popular backends.
Observability with logs & Grafana
Discover how you can utilize, manage, and visualize log events with Grafana and Grafana’s logging application Loki.