Skip to content

Commit 5105f52

Browse files
docs(codecs): Document the output type of each decoder
This also includes updated website cue files, generated with `make generate-component-doc`.
1 parent 22bd2ae commit 5105f52

File tree

23 files changed

+434
-22
lines changed

23 files changed

+434
-22
lines changed

lib/codecs/src/decoding/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,21 @@ impl tokio_util::codec::Decoder for Framer {
237237
#[configurable(metadata(docs::enum_tag_description = "The codec to use for decoding events."))]
238238
pub enum DeserializerConfig {
239239
/// Uses the raw bytes as-is.
240+
///
241+
/// This decoder outputs logs.
240242
Bytes,
241243

242244
/// Decodes the raw bytes as [JSON][json].
243245
///
246+
/// This decoder outputs logs.
247+
///
244248
/// [json]: https://www.json.org/
245249
Json(JsonDeserializerConfig),
246250

247251
/// Decodes the raw bytes as [protobuf][protobuf].
248252
///
253+
/// This decoder outputs logs.
254+
///
249255
/// [protobuf]: https://protobuf.dev/
250256
Protobuf(ProtobufDeserializerConfig),
251257

@@ -264,6 +270,8 @@ pub enum DeserializerConfig {
264270
/// Decodes either as the [RFC 3164][rfc3164]-style format ("old" style) or the
265271
/// [RFC 5424][rfc5424]-style format ("new" style, includes structured data).
266272
///
273+
/// This decoder outputs logs.
274+
///
267275
/// [rfc3164]: https://www.ietf.org/rfc/rfc3164.txt
268276
/// [rfc5424]: https://www.ietf.org/rfc/rfc5424.txt
269277
Syslog(SyslogDeserializerConfig),
@@ -302,17 +310,23 @@ pub enum DeserializerConfig {
302310
/// Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
303311
/// the codec may continue to relax the enforcement of specification.
304312
///
313+
/// This decoder outputs logs.
314+
///
305315
/// [gelf]: https://docs.graylog.org/docs/gelf
306316
/// [implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go
307317
Gelf(GelfDeserializerConfig),
308318

309319
/// Decodes the raw bytes as an [Influxdb Line Protocol][influxdb] message.
310320
///
321+
/// This decoder outputs metrics.
322+
///
311323
/// [influxdb]: https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol
312324
Influxdb(InfluxdbDeserializerConfig),
313325

314326
/// Decodes the raw bytes as as an [Apache Avro][apache_avro] message.
315327
///
328+
/// This decoder outputs logs.
329+
///
316330
/// [apache_avro]: https://avro.apache.org/
317331
Avro {
318332
/// Apache Avro-specific encoder options.
@@ -321,6 +335,8 @@ pub enum DeserializerConfig {
321335

322336
/// Decodes the raw bytes as a string and passes them as input to a [VRL][vrl] program.
323337
///
338+
/// This decoder outputs logs.
339+
///
324340
/// [vrl]: https://vector.dev/docs/reference/vrl
325341
Vrl(VrlDeserializerConfig),
326342
}

website/cue/reference/components/sinks/generated/websocket_server.cue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,15 @@ generated: components: sinks: websocket_server: configuration: {
622622
avro: """
623623
Decodes the raw bytes as as an [Apache Avro][apache_avro] message.
624624
625+
This decoder outputs logs.
626+
625627
[apache_avro]: https://avro.apache.org/
626628
"""
627-
bytes: "Uses the raw bytes as-is."
629+
bytes: """
630+
Uses the raw bytes as-is.
631+
632+
This decoder outputs logs.
633+
"""
628634
gelf: """
629635
Decodes the raw bytes as a [GELF][gelf] message.
630636
@@ -640,17 +646,23 @@ generated: components: sinks: websocket_server: configuration: {
640646
Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
641647
the codec may continue to relax the enforcement of specification.
642648
649+
This decoder outputs logs.
650+
643651
[gelf]: https://docs.graylog.org/docs/gelf
644652
[implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go
645653
"""
646654
influxdb: """
647655
Decodes the raw bytes as an [Influxdb Line Protocol][influxdb] message.
648656
657+
This decoder outputs metrics.
658+
649659
[influxdb]: https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol
650660
"""
651661
json: """
652662
Decodes the raw bytes as [JSON][json].
653663
664+
This decoder outputs logs.
665+
654666
[json]: https://www.json.org/
655667
"""
656668
native: """
@@ -684,6 +696,8 @@ generated: components: sinks: websocket_server: configuration: {
684696
protobuf: """
685697
Decodes the raw bytes as [protobuf][protobuf].
686698
699+
This decoder outputs logs.
700+
687701
[protobuf]: https://protobuf.dev/
688702
"""
689703
syslog: """
@@ -692,12 +706,16 @@ generated: components: sinks: websocket_server: configuration: {
692706
Decodes either as the [RFC 3164][rfc3164]-style format ("old" style) or the
693707
[RFC 5424][rfc5424]-style format ("new" style, includes structured data).
694708
709+
This decoder outputs logs.
710+
695711
[rfc3164]: https://www.ietf.org/rfc/rfc3164.txt
696712
[rfc5424]: https://www.ietf.org/rfc/rfc5424.txt
697713
"""
698714
vrl: """
699715
Decodes the raw bytes as a string and passes them as input to a [VRL][vrl] program.
700716
717+
This decoder outputs logs.
718+
701719
[vrl]: https://vector.dev/docs/reference/vrl
702720
"""
703721
}

website/cue/reference/components/sources/generated/amqp.cue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,15 @@ generated: components: sources: amqp: configuration: {
9090
avro: """
9191
Decodes the raw bytes as as an [Apache Avro][apache_avro] message.
9292
93+
This decoder outputs logs.
94+
9395
[apache_avro]: https://avro.apache.org/
9496
"""
95-
bytes: "Uses the raw bytes as-is."
97+
bytes: """
98+
Uses the raw bytes as-is.
99+
100+
This decoder outputs logs.
101+
"""
96102
gelf: """
97103
Decodes the raw bytes as a [GELF][gelf] message.
98104
@@ -108,17 +114,23 @@ generated: components: sources: amqp: configuration: {
108114
Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
109115
the codec may continue to relax the enforcement of specification.
110116
117+
This decoder outputs logs.
118+
111119
[gelf]: https://docs.graylog.org/docs/gelf
112120
[implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go
113121
"""
114122
influxdb: """
115123
Decodes the raw bytes as an [Influxdb Line Protocol][influxdb] message.
116124
125+
This decoder outputs metrics.
126+
117127
[influxdb]: https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol
118128
"""
119129
json: """
120130
Decodes the raw bytes as [JSON][json].
121131
132+
This decoder outputs logs.
133+
122134
[json]: https://www.json.org/
123135
"""
124136
native: """
@@ -152,6 +164,8 @@ generated: components: sources: amqp: configuration: {
152164
protobuf: """
153165
Decodes the raw bytes as [protobuf][protobuf].
154166
167+
This decoder outputs logs.
168+
155169
[protobuf]: https://protobuf.dev/
156170
"""
157171
syslog: """
@@ -160,12 +174,16 @@ generated: components: sources: amqp: configuration: {
160174
Decodes either as the [RFC 3164][rfc3164]-style format ("old" style) or the
161175
[RFC 5424][rfc5424]-style format ("new" style, includes structured data).
162176
177+
This decoder outputs logs.
178+
163179
[rfc3164]: https://www.ietf.org/rfc/rfc3164.txt
164180
[rfc5424]: https://www.ietf.org/rfc/rfc5424.txt
165181
"""
166182
vrl: """
167183
Decodes the raw bytes as a string and passes them as input to a [VRL][vrl] program.
168184
185+
This decoder outputs logs.
186+
169187
[vrl]: https://vector.dev/docs/reference/vrl
170188
"""
171189
}

website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,15 @@ generated: components: sources: aws_kinesis_firehose: configuration: {
9393
avro: """
9494
Decodes the raw bytes as as an [Apache Avro][apache_avro] message.
9595
96+
This decoder outputs logs.
97+
9698
[apache_avro]: https://avro.apache.org/
9799
"""
98-
bytes: "Uses the raw bytes as-is."
100+
bytes: """
101+
Uses the raw bytes as-is.
102+
103+
This decoder outputs logs.
104+
"""
99105
gelf: """
100106
Decodes the raw bytes as a [GELF][gelf] message.
101107
@@ -111,17 +117,23 @@ generated: components: sources: aws_kinesis_firehose: configuration: {
111117
Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
112118
the codec may continue to relax the enforcement of specification.
113119
120+
This decoder outputs logs.
121+
114122
[gelf]: https://docs.graylog.org/docs/gelf
115123
[implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go
116124
"""
117125
influxdb: """
118126
Decodes the raw bytes as an [Influxdb Line Protocol][influxdb] message.
119127
128+
This decoder outputs metrics.
129+
120130
[influxdb]: https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol
121131
"""
122132
json: """
123133
Decodes the raw bytes as [JSON][json].
124134
135+
This decoder outputs logs.
136+
125137
[json]: https://www.json.org/
126138
"""
127139
native: """
@@ -155,6 +167,8 @@ generated: components: sources: aws_kinesis_firehose: configuration: {
155167
protobuf: """
156168
Decodes the raw bytes as [protobuf][protobuf].
157169
170+
This decoder outputs logs.
171+
158172
[protobuf]: https://protobuf.dev/
159173
"""
160174
syslog: """
@@ -163,12 +177,16 @@ generated: components: sources: aws_kinesis_firehose: configuration: {
163177
Decodes either as the [RFC 3164][rfc3164]-style format ("old" style) or the
164178
[RFC 5424][rfc5424]-style format ("new" style, includes structured data).
165179
180+
This decoder outputs logs.
181+
166182
[rfc3164]: https://www.ietf.org/rfc/rfc3164.txt
167183
[rfc5424]: https://www.ietf.org/rfc/rfc5424.txt
168184
"""
169185
vrl: """
170186
Decodes the raw bytes as a string and passes them as input to a [VRL][vrl] program.
171187
188+
This decoder outputs logs.
189+
172190
[vrl]: https://vector.dev/docs/reference/vrl
173191
"""
174192
}

website/cue/reference/components/sources/generated/aws_s3.cue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,15 @@ generated: components: sources: aws_s3: configuration: {
208208
avro: """
209209
Decodes the raw bytes as as an [Apache Avro][apache_avro] message.
210210
211+
This decoder outputs logs.
212+
211213
[apache_avro]: https://avro.apache.org/
212214
"""
213-
bytes: "Uses the raw bytes as-is."
215+
bytes: """
216+
Uses the raw bytes as-is.
217+
218+
This decoder outputs logs.
219+
"""
214220
gelf: """
215221
Decodes the raw bytes as a [GELF][gelf] message.
216222
@@ -226,17 +232,23 @@ generated: components: sources: aws_s3: configuration: {
226232
Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
227233
the codec may continue to relax the enforcement of specification.
228234
235+
This decoder outputs logs.
236+
229237
[gelf]: https://docs.graylog.org/docs/gelf
230238
[implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go
231239
"""
232240
influxdb: """
233241
Decodes the raw bytes as an [Influxdb Line Protocol][influxdb] message.
234242
243+
This decoder outputs metrics.
244+
235245
[influxdb]: https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol
236246
"""
237247
json: """
238248
Decodes the raw bytes as [JSON][json].
239249
250+
This decoder outputs logs.
251+
240252
[json]: https://www.json.org/
241253
"""
242254
native: """
@@ -270,6 +282,8 @@ generated: components: sources: aws_s3: configuration: {
270282
protobuf: """
271283
Decodes the raw bytes as [protobuf][protobuf].
272284
285+
This decoder outputs logs.
286+
273287
[protobuf]: https://protobuf.dev/
274288
"""
275289
syslog: """
@@ -278,12 +292,16 @@ generated: components: sources: aws_s3: configuration: {
278292
Decodes either as the [RFC 3164][rfc3164]-style format ("old" style) or the
279293
[RFC 5424][rfc5424]-style format ("new" style, includes structured data).
280294
295+
This decoder outputs logs.
296+
281297
[rfc3164]: https://www.ietf.org/rfc/rfc3164.txt
282298
[rfc5424]: https://www.ietf.org/rfc/rfc5424.txt
283299
"""
284300
vrl: """
285301
Decodes the raw bytes as a string and passes them as input to a [VRL][vrl] program.
286302
303+
This decoder outputs logs.
304+
287305
[vrl]: https://vector.dev/docs/reference/vrl
288306
"""
289307
}

website/cue/reference/components/sources/generated/aws_sqs.cue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,15 @@ generated: components: sources: aws_sqs: configuration: {
203203
avro: """
204204
Decodes the raw bytes as as an [Apache Avro][apache_avro] message.
205205
206+
This decoder outputs logs.
207+
206208
[apache_avro]: https://avro.apache.org/
207209
"""
208-
bytes: "Uses the raw bytes as-is."
210+
bytes: """
211+
Uses the raw bytes as-is.
212+
213+
This decoder outputs logs.
214+
"""
209215
gelf: """
210216
Decodes the raw bytes as a [GELF][gelf] message.
211217
@@ -221,17 +227,23 @@ generated: components: sources: aws_sqs: configuration: {
221227
Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
222228
the codec may continue to relax the enforcement of specification.
223229
230+
This decoder outputs logs.
231+
224232
[gelf]: https://docs.graylog.org/docs/gelf
225233
[implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go
226234
"""
227235
influxdb: """
228236
Decodes the raw bytes as an [Influxdb Line Protocol][influxdb] message.
229237
238+
This decoder outputs metrics.
239+
230240
[influxdb]: https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol
231241
"""
232242
json: """
233243
Decodes the raw bytes as [JSON][json].
234244
245+
This decoder outputs logs.
246+
235247
[json]: https://www.json.org/
236248
"""
237249
native: """
@@ -265,6 +277,8 @@ generated: components: sources: aws_sqs: configuration: {
265277
protobuf: """
266278
Decodes the raw bytes as [protobuf][protobuf].
267279
280+
This decoder outputs logs.
281+
268282
[protobuf]: https://protobuf.dev/
269283
"""
270284
syslog: """
@@ -273,12 +287,16 @@ generated: components: sources: aws_sqs: configuration: {
273287
Decodes either as the [RFC 3164][rfc3164]-style format ("old" style) or the
274288
[RFC 5424][rfc5424]-style format ("new" style, includes structured data).
275289
290+
This decoder outputs logs.
291+
276292
[rfc3164]: https://www.ietf.org/rfc/rfc3164.txt
277293
[rfc5424]: https://www.ietf.org/rfc/rfc5424.txt
278294
"""
279295
vrl: """
280296
Decodes the raw bytes as a string and passes them as input to a [VRL][vrl] program.
281297
298+
This decoder outputs logs.
299+
282300
[vrl]: https://vector.dev/docs/reference/vrl
283301
"""
284302
}

0 commit comments

Comments
 (0)