Skip to content

Commit ab68266

Browse files
authored
Merge branch 'main' into windows_filter
2 parents 7af305f + fe194f1 commit ab68266

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/sources/flow/reference/components/loki.source.kafka.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,27 +147,27 @@ This example consumes Kafka events from the specified brokers and topics
147147
then forwards them to a `loki.write` component using the Kafka timestamp.
148148

149149
```river
150-
loki.relabel "kafka" {
151-
rule {
152-
source_labels = ["__meta_kafka_topic"]
153-
target_label = "topic"
154-
}
155-
}
156-
157-
158150
loki.source.kafka "local" {
159151
brokers = ["localhost:9092"]
160152
topics = ["quickstart-events"]
161153
labels = {component = "loki.source.kafka"}
162-
forward_to = [loki.write.local.receiver]
154+
forward_to = [loki.relabel.kafka.receiver]
163155
use_incoming_timestamp = true
164156
relabel_rules = loki.relabel.kafka.rules
165157
}
166158
159+
loki.relabel "kafka" {
160+
forward_to = [loki.write.local.receiver]
161+
162+
rule {
163+
source_labels = ["__meta_kafka_topic"]
164+
target_label = "topic"
165+
}
166+
}
167+
167168
loki.write "local" {
168169
endpoint {
169170
url = "loki:3100/api/v1/push"
170171
}
171172
}
172173
```
173-

0 commit comments

Comments
 (0)