You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
labelextract - Matches regex against all label names. Any labels that match are added to the extracted values map, renamed according to the contents of the replacement field.
Use case
Many loki.source.* components provide valuable metadata in internal (__.+) labels. This metadata is sometimes useful as labels, but more often, it's not. It can be suitable for structured metadata or injecting into the log message itself, but doing so is currently seemingly impossible (there are no loki.process stages that extract values from labels, and the stages that affect structured metadata or log message do not read from labels). Even if it would be possible to read from labels in these components, you would have to ensure you drop the labels again before sending the log entry to a loki backend.
The text was updated successfully, but these errors were encountered:
Request
A new
action
forloki.relabel
:labelextract
- Matchesregex
against all label names. Any labels that match are added to the extracted values map, renamed according to the contents of thereplacement
field.Use case
Many
loki.source.*
components provide valuable metadata in internal (__.+
) labels. This metadata is sometimes useful as labels, but more often, it's not. It can be suitable for structured metadata or injecting into the log message itself, but doing so is currently seemingly impossible (there are noloki.process
stages that extract values from labels, and the stages that affect structured metadata or log message do not read from labels). Even if it would be possible to read from labels in these components, you would have to ensure you drop the labels again before sending the log entry to a loki backend.The text was updated successfully, but these errors were encountered: