The static_labels stage is an action stage that adds static-labels to the label set that is sent to Loki with the log entry.
static_labels: [ <string>: [<string>] ... ]
For the given pipeline:
- json: expressions: stream: stream - labels: stream: - static_labels: custom_key: custom_val
Given the following log line:
The first stage would extract
stream into the extracted map with a value of
labels stage would turn that key-value pair into a label. The
static_labels stage would add the provided static labels into the label set.
The resulting entry that is sent to Loki will contain
custom_key="custom_val" as labels.