Skip to content

Commit 5cedf01

Browse files
docs(codecs): fix wording in decoder and framing doc strings (#25382)
* docs(codecs): fix wording in decoder and framing doc strings * Update generated docs * Regenerate splunk_hec.cue
1 parent cdb27e8 commit 5cedf01

32 files changed

Lines changed: 639 additions & 712 deletions

‎lib/codecs/src/decoding/format/avro.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ pub struct AvroDeserializerOptions {
103103
))]
104104
pub schema: String,
105105

106-
/// For Avro datum encoded in Kafka messages, the bytes are prefixed with the schema ID. Set this to `true` to strip the schema ID prefix.
107-
/// According to [Confluent Kafka's document](https://docs.confluent.io/platform/current/schema-registry/fundamentals/serdes-develop/index.html#wire-format).
106+
/// For Avro datum encoded in Kafka messages, the bytes are prefixed with the schema ID. Set this to `true` to strip the schema ID prefix, as described in [Confluent Kafka's documentation](https://docs.confluent.io/platform/current/schema-registry/fundamentals/serdes-develop/index.html#wire-format).
108107
pub strip_schema_id_prefix: bool,
109108
}
110109

‎lib/codecs/src/decoding/format/gelf.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub enum ValidationMode {
4747

4848
/// Uses more relaxed validation that skips strict GELF specification checks.
4949
///
50-
/// This mode will not treat specification violations as errors, allowing the decoder
50+
/// This mode does not treat specification violations as errors, allowing the decoder
5151
/// to accept messages from sources that don't strictly follow the GELF spec.
5252
Relaxed,
5353
}

‎lib/codecs/src/decoding/format/otlp.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ pub enum OtlpSignalType {
3434
pub struct OtlpDeserializerConfig {
3535
/// Signal types to attempt parsing, in priority order.
3636
///
37-
/// The deserializer will try parsing in the order specified. This allows you to optimize
37+
/// The deserializer tries to parse signals in the specified order. This allows you to optimize
3838
/// performance when you know the expected signal types. For example, if you only receive
3939
/// traces, set this to `["traces"]` to avoid attempting to parse as logs or metrics first.
4040
///
41-
/// If not specified, defaults to trying all types in order: logs, metrics, traces.
41+
/// If not specified, defaults to trying all types in this order: logs, metrics, traces.
4242
/// Duplicate signal types are automatically removed while preserving order.
4343
#[serde(default = "default_signal_types")]
4444
pub signal_types: IndexSet<OtlpSignalType>,

‎lib/codecs/src/decoding/format/protobuf.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub struct ProtobufDeserializerOptions {
7575
///
7676
/// This file is the output of `protoc -I <include path> -o <desc output path> <proto>`.
7777
///
78-
/// You can read more [here](https://buf.build/docs/reference/images/#how-buf-images-work).
78+
/// For more information, see [How Buf images work](https://buf.build/docs/reference/images/#how-buf-images-work).
7979
pub desc_file: PathBuf,
8080

8181
/// The name of the message type to use for serializing.
@@ -85,7 +85,7 @@ pub struct ProtobufDeserializerOptions {
8585
/// Use JSON field names (camelCase) instead of protobuf field names (snake_case).
8686
///
8787
/// When enabled, the deserializer will output fields using their JSON names as defined
88-
/// in the `.proto` file (e.g., `jobDescription` instead of `job_description`).
88+
/// in the `.proto` file (for example, `jobDescription` instead of `job_description`).
8989
///
9090
/// This is useful when working with data that needs to be converted to JSON or
9191
/// when interfacing with systems that use JSON naming conventions.

‎lib/codecs/src/decoding/format/vrl.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ pub struct VrlDeserializerConfig {
3030
#[derive(Debug, Clone, PartialEq, Eq, Default)]
3131
pub struct VrlDeserializerOptions {
3232
/// The [Vector Remap Language][vrl] (VRL) program to execute for each event.
33-
/// Note that the final contents of the `.` target will be used as the decoding result.
34-
/// Compilation error or use of 'abort' in a program will result in a decoding error.
33+
/// The final contents of the `.` target are used as the decoding result.
34+
/// Compilation errors or use of `abort` in the program result in a decoding error.
3535
///
3636
///
3737
/// [vrl]: https://vector.dev/docs/reference/vrl

‎lib/codecs/src/decoding/framing/character_delimited.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ pub struct CharacterDelimitedDecoderOptions {
4747
///
4848
/// This length does *not* include the trailing delimiter.
4949
///
50-
/// By default, there is no maximum length enforced. If events are malformed, this can lead to
50+
/// By default, no maximum length is enforced. If events are malformed, this can lead to
5151
/// additional resource usage as events continue to be buffered in memory, and can potentially
5252
/// lead to memory exhaustion in extreme cases.
5353
///
5454
/// If there is a risk of processing malformed data, such as logs with user-controlled input,
5555
/// consider setting the maximum length to a reasonably large value as a safety net. This
56-
/// ensures that processing is not actually unbounded.
56+
/// prevents processing from being unbounded.
5757
#[serde(skip_serializing_if = "vector_core::serde::is_default")]
5858
pub max_length: Option<usize>,
5959
}

‎lib/codecs/src/decoding/framing/chunked_gelf.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl ChunkedGelfDecoderConfig {
5454
#[derivative(Default)]
5555
pub struct ChunkedGelfDecoderOptions {
5656
/// The timeout, in seconds, for a message to be fully received. If the timeout is reached, the
57-
/// decoder drops all the received chunks of the timed out message.
57+
/// decoder drops all received chunks for the timed-out message.
5858
#[serde(default = "default_timeout_secs")]
5959
#[derivative(Default(value = "default_timeout_secs()"))]
6060
pub timeout_secs: f64,
@@ -66,15 +66,15 @@ pub struct ChunkedGelfDecoderOptions {
6666
#[serde(default, skip_serializing_if = "vector_core::serde::is_default")]
6767
pub pending_messages_limit: Option<usize>,
6868

69-
/// The maximum length of a single GELF message, in bytes. Messages longer than this length will
70-
/// be dropped. If this option is not set, the decoder does not limit the length of messages and
69+
/// The maximum length of a single GELF message, in bytes. Messages longer than this length are
70+
/// dropped. If this option is not set, the decoder does not limit the length of messages and
7171
/// the per-message memory is unbounded.
7272
///
73-
/// **Note**: A message can be composed of multiple chunks and this limit is applied to the whole
73+
/// **Note**: A message can be composed of multiple chunks, and this limit applies to the whole
7474
/// message, not to individual chunks.
7575
///
76-
/// This limit takes only into account the message's payload and the GELF header bytes are excluded from the calculation.
77-
/// The message's payload is the concatenation of all the chunks' payloads.
76+
/// This limit takes into account only the message payload. GELF header bytes are excluded from the calculation.
77+
/// The message payload is the concatenation of all chunk payloads.
7878
#[serde(default, skip_serializing_if = "vector_core::serde::is_default")]
7979
pub max_length: Option<usize>,
8080

‎lib/codecs/src/decoding/framing/newline_delimited.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ pub struct NewlineDelimitedDecoderOptions {
2121
///
2222
/// This length does *not* include the trailing delimiter.
2323
///
24-
/// By default, there is no maximum length enforced. If events are malformed, this can lead to
24+
/// By default, no maximum length is enforced. If events are malformed, this can lead to
2525
/// additional resource usage as events continue to be buffered in memory, and can potentially
2626
/// lead to memory exhaustion in extreme cases.
2727
///
2828
/// If there is a risk of processing malformed data, such as logs with user-controlled input,
2929
/// consider setting the maximum length to a reasonably large value as a safety net. This
30-
/// ensures that processing is not actually unbounded.
30+
/// prevents processing from being unbounded.
3131
#[serde(skip_serializing_if = "vector_core::serde::is_default")]
3232
pub max_length: Option<usize>,
3333
}

‎lib/codecs/src/decoding/mod.rs‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ pub enum DeserializerConfig {
270270

271271
/// Decodes the raw bytes as [native Protocol Buffers format][vector_native_protobuf].
272272
///
273-
/// This decoder can output all types of events (logs, metrics, traces).
273+
/// This decoder can output all types of events: logs, metrics, and traces.
274274
///
275275
/// This codec is **[experimental][experimental]**.
276276
///
@@ -280,7 +280,7 @@ pub enum DeserializerConfig {
280280

281281
/// Decodes the raw bytes as [native JSON format][vector_native_json].
282282
///
283-
/// This decoder can output all types of events (logs, metrics, traces).
283+
/// This decoder can output all types of events: logs, metrics, and traces.
284284
///
285285
/// This codec is **[experimental][experimental]**.
286286
///
@@ -294,13 +294,13 @@ pub enum DeserializerConfig {
294294
///
295295
/// The GELF specification is more strict than the actual Graylog receiver.
296296
/// Vector's decoder adheres more strictly to the GELF spec, with
297-
/// the exception that some characters such as `@` are allowed in field names.
297+
/// the exception that some characters such as `@` are allowed in field names.
298298
///
299-
/// Other GELF codecs such as Loki's, use a [Go SDK][implementation] that is maintained
300-
/// by Graylog, and is much more relaxed than the GELF spec.
299+
/// Other GELF codecs, such as Loki's, use a [Go SDK][implementation] that is maintained
300+
/// by Graylog and is much more relaxed than the GELF spec.
301301
///
302-
/// Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
303-
/// the codec may continue to relax the enforcement of specification.
302+
/// Going forward, Vector will use the [Go SDK][implementation] as the reference implementation, which means
303+
/// the codec may continue to relax the enforcement of the specification.
304304
///
305305
/// [gelf]: https://docs.graylog.org/docs/gelf
306306
/// [implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go

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

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,8 @@ generated: components: sinks: websocket_server: configuration: {
604604
type: string: examples: ["{ \"type\": \"record\", \"name\": \"log\", \"fields\": [{ \"name\": \"message\", \"type\": \"string\" }] }"]
605605
}
606606
strip_schema_id_prefix: {
607-
description: """
608-
For Avro datum encoded in Kafka messages, the bytes are prefixed with the schema ID. Set this to `true` to strip the schema ID prefix.
609-
According to [Confluent Kafka's document](https://docs.confluent.io/platform/current/schema-registry/fundamentals/serdes-develop/index.html#wire-format).
610-
"""
611-
required: true
607+
description: "For Avro datum encoded in Kafka messages, the bytes are prefixed with the schema ID. Set this to `true` to strip the schema ID prefix, as described in [Confluent Kafka's documentation](https://docs.confluent.io/platform/current/schema-registry/fundamentals/serdes-develop/index.html#wire-format)."
608+
required: true
612609
type: bool: {}
613610
}
614611
}
@@ -632,13 +629,13 @@ generated: components: sinks: websocket_server: configuration: {
632629
633630
The GELF specification is more strict than the actual Graylog receiver.
634631
Vector's decoder adheres more strictly to the GELF spec, with
635-
the exception that some characters such as `@` are allowed in field names.
632+
the exception that some characters such as `@` are allowed in field names.
636633
637-
Other GELF codecs such as Loki's, use a [Go SDK][implementation] that is maintained
638-
by Graylog, and is much more relaxed than the GELF spec.
634+
Other GELF codecs, such as Loki's, use a [Go SDK][implementation] that is maintained
635+
by Graylog and is much more relaxed than the GELF spec.
639636
640-
Going forward, Vector will use that [Go SDK][implementation] as the reference implementation, which means
641-
the codec may continue to relax the enforcement of specification.
637+
Going forward, Vector will use the [Go SDK][implementation] as the reference implementation, which means
638+
the codec may continue to relax the enforcement of the specification.
642639
643640
[gelf]: https://docs.graylog.org/docs/gelf
644641
[implementation]: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go
@@ -656,7 +653,7 @@ generated: components: sinks: websocket_server: configuration: {
656653
native: """
657654
Decodes the raw bytes as [native Protocol Buffers format][vector_native_protobuf].
658655
659-
This decoder can output all types of events (logs, metrics, traces).
656+
This decoder can output all types of events: logs, metrics, and traces.
660657
661658
This codec is **[experimental][experimental]**.
662659
@@ -666,7 +663,7 @@ generated: components: sinks: websocket_server: configuration: {
666663
native_json: """
667664
Decodes the raw bytes as [native JSON format][vector_native_json].
668665
669-
This decoder can output all types of events (logs, metrics, traces).
666+
This decoder can output all types of events: logs, metrics, and traces.
670667
671668
This codec is **[experimental][experimental]**.
672669
@@ -728,7 +725,7 @@ generated: components: sinks: websocket_server: configuration: {
728725
relaxed: """
729726
Uses more relaxed validation that skips strict GELF specification checks.
730727
731-
This mode will not treat specification violations as errors, allowing the decoder
728+
This mode does not treat specification violations as errors, allowing the decoder
732729
to accept messages from sources that don't strictly follow the GELF spec.
733730
"""
734731
strict: "Uses strict validation that closely follows the GELF spec."
@@ -796,7 +793,7 @@ generated: components: sinks: websocket_server: configuration: {
796793
797794
This file is the output of `protoc -I <include path> -o <desc output path> <proto>`.
798795
799-
You can read more [here](https://buf.build/docs/reference/images/#how-buf-images-work).
796+
For more information, see [How Buf images work](https://buf.build/docs/reference/images/#how-buf-images-work).
800797
"""
801798
required: false
802799
type: string: default: ""
@@ -814,7 +811,7 @@ generated: components: sinks: websocket_server: configuration: {
814811
Use JSON field names (camelCase) instead of protobuf field names (snake_case).
815812
816813
When enabled, the deserializer will output fields using their JSON names as defined
817-
in the `.proto` file (e.g., `jobDescription` instead of `job_description`).
814+
in the `.proto` file (for example, `jobDescription` instead of `job_description`).
818815
819816
This is useful when working with data that needs to be converted to JSON or
820817
when interfacing with systems that use JSON naming conventions.
@@ -828,11 +825,11 @@ generated: components: sinks: websocket_server: configuration: {
828825
description: """
829826
Signal types to attempt parsing, in priority order.
830827
831-
The deserializer will try parsing in the order specified. This allows you to optimize
828+
The deserializer tries to parse signals in the specified order. This allows you to optimize
832829
performance when you know the expected signal types. For example, if you only receive
833830
traces, set this to `["traces"]` to avoid attempting to parse as logs or metrics first.
834831
835-
If not specified, defaults to trying all types in order: logs, metrics, traces.
832+
If not specified, defaults to trying all types in this order: logs, metrics, traces.
836833
Duplicate signal types are automatically removed while preserving order.
837834
"""
838835
relevant_when: "codec = \"otlp\""
@@ -870,8 +867,8 @@ generated: components: sinks: websocket_server: configuration: {
870867
source: {
871868
description: """
872869
The [Vector Remap Language][vrl] (VRL) program to execute for each event.
873-
Note that the final contents of the `.` target will be used as the decoding result.
874-
Compilation error or use of 'abort' in a program will result in a decoding error.
870+
The final contents of the `.` target are used as the decoding result.
871+
Compilation errors or use of `abort` in the program result in a decoding error.
875872
876873
[vrl]: https://vector.dev/docs/reference/vrl
877874
"""

0 commit comments

Comments
 (0)