Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
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
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.