diff --git a/docs/sources/reference/components/loki/loki.enrich.md b/docs/sources/reference/components/loki/loki.enrich.md index 8d74924c31e..fcc4a8b5a9f 100644 --- a/docs/sources/reference/components/loki/loki.enrich.md +++ b/docs/sources/reference/components/loki/loki.enrich.md @@ -15,25 +15,33 @@ description: The loki.enrich component enriches logs with labels from service di {{< docs/shared lookup="stability/experimental.md" source="alloy" version="" >}} The `loki.enrich` component enriches logs with additional labels from service discovery targets. -It matches a label from incoming logs against a label from discovered targets, and copies specified labels from the matched target to the log entry. +It matches labels from incoming logs against labels from discovered targets, and copies specified labels from the matched target to the log entry. +If no match occurs, the component forwards the log entry unchanged. + +Use the `target_to_log_match` argument to specify which target labels correspond to which log labels. +The map keys are target label names and the values are the corresponding log label names. +All labels in the map must match for enrichment to occur. + +{{< admonition type="warning" >}} +The `target_match_label` and `logs_match_label` arguments are deprecated in favor of `target_to_log_match`. +If `target_to_log_match` is set, it takes precedence. +Replace `target_match_label = "hostname"` with `target_to_log_match = {"hostname" = "hostname"}`. +These deprecated arguments will be removed in a future release. +{{< /admonition >}} ## Usage ```alloy loki.enrich "