From d85fe527db039a05708df2e37be79639e55a0aca Mon Sep 17 00:00:00 2001 From: Clayton Cornell Date: Wed, 13 Sep 2023 09:35:20 -0700 Subject: [PATCH] Update the example syntax --- .../reference/components/loki.source.kafka.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/sources/flow/reference/components/loki.source.kafka.md b/docs/sources/flow/reference/components/loki.source.kafka.md index 106fc503a354..a0f3f66f6c3f 100644 --- a/docs/sources/flow/reference/components/loki.source.kafka.md +++ b/docs/sources/flow/reference/components/loki.source.kafka.md @@ -147,27 +147,27 @@ This example consumes Kafka events from the specified brokers and topics then forwards them to a `loki.write` component using the Kafka timestamp. ```river -loki.relabel "kafka" { - rule { - source_labels = ["__meta_kafka_topic"] - target_label = "topic" - } -} - - loki.source.kafka "local" { brokers = ["localhost:9092"] topics = ["quickstart-events"] labels = {component = "loki.source.kafka"} - forward_to = [loki.write.local.receiver] + forward_to = [loki.relabel.kafka.receiver] use_incoming_timestamp = true relabel_rules = loki.relabel.kafka.rules } +loki.relabel "kafka" { + forward_to = [loki.write.local.receiver] + + rule { + source_labels = ["__meta_kafka_topic"] + target_label = "topic" + } +} + loki.write "local" { endpoint { url = "loki:3100/api/v1/push" } } ``` -