From 0151b18241fca0d191df22d5d7c1a15704a8c307 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 14:10:50 -0400 Subject: [PATCH 1/8] feat(codecs): add 'use_json_names' options to protobuf codecs --- lib/codecs/src/decoding/format/protobuf.rs | 18 +++++- lib/codecs/src/encoding/format/protobuf.rs | 15 ++++- lib/codecs/tests/data/protobuf/Makefile | 51 +++++++++++++++++ lib/codecs/tests/data/protobuf/README.md | 19 ++++--- .../tests/data/protobuf/generate_example.py | 31 ---------- .../data/protobuf/pbs/person_someone.txt | 6 +- .../data/protobuf/pbs/person_someone3.txt | 11 +++- .../data/protobuf/protos/test_protobuf.desc | Bin 1183 -> 372 bytes .../data/protobuf/protos/test_protobuf3.desc | Bin 1429 -> 595 bytes lib/codecs/tests/protobuf.rs | 53 ++++++++++++++++++ src/components/validation/resources/mod.rs | 2 + .../components/sinks/generated/amqp.cue | 16 ++++++ .../sinks/generated/aws_cloudwatch_logs.cue | 16 ++++++ .../sinks/generated/aws_kinesis_firehose.cue | 16 ++++++ .../sinks/generated/aws_kinesis_streams.cue | 16 ++++++ .../components/sinks/generated/aws_s3.cue | 16 ++++++ .../components/sinks/generated/aws_sns.cue | 16 ++++++ .../components/sinks/generated/aws_sqs.cue | 16 ++++++ .../components/sinks/generated/azure_blob.cue | 16 ++++++ .../components/sinks/generated/console.cue | 16 ++++++ .../components/sinks/generated/file.cue | 16 ++++++ .../generated/gcp_chronicle_unstructured.cue | 16 ++++++ .../sinks/generated/gcp_cloud_storage.cue | 16 ++++++ .../components/sinks/generated/gcp_pubsub.cue | 16 ++++++ .../components/sinks/generated/http.cue | 16 ++++++ .../components/sinks/generated/humio_logs.cue | 16 ++++++ .../components/sinks/generated/kafka.cue | 16 ++++++ .../components/sinks/generated/loki.cue | 16 ++++++ .../components/sinks/generated/mqtt.cue | 16 ++++++ .../components/sinks/generated/nats.cue | 16 ++++++ .../sinks/generated/opentelemetry.cue | 16 ++++++ .../components/sinks/generated/papertrail.cue | 16 ++++++ .../components/sinks/generated/pulsar.cue | 16 ++++++ .../components/sinks/generated/redis.cue | 16 ++++++ .../components/sinks/generated/socket.cue | 16 ++++++ .../sinks/generated/splunk_hec_logs.cue | 16 ++++++ .../components/sinks/generated/webhdfs.cue | 16 ++++++ .../components/sinks/generated/websocket.cue | 16 ++++++ .../sinks/generated/websocket_server.cue | 32 +++++++++++ .../components/sources/generated/amqp.cue | 16 ++++++ .../generated/aws_kinesis_firehose.cue | 16 ++++++ .../components/sources/generated/aws_s3.cue | 16 ++++++ .../components/sources/generated/aws_sqs.cue | 16 ++++++ .../sources/generated/datadog_agent.cue | 16 ++++++ .../sources/generated/demo_logs.cue | 16 ++++++ .../components/sources/generated/exec.cue | 16 ++++++ .../sources/generated/file_descriptor.cue | 16 ++++++ .../sources/generated/gcp_pubsub.cue | 16 ++++++ .../sources/generated/heroku_logs.cue | 16 ++++++ .../components/sources/generated/http.cue | 16 ++++++ .../sources/generated/http_client.cue | 16 ++++++ .../sources/generated/http_server.cue | 16 ++++++ .../components/sources/generated/kafka.cue | 16 ++++++ .../components/sources/generated/mqtt.cue | 16 ++++++ .../components/sources/generated/nats.cue | 16 ++++++ .../components/sources/generated/pulsar.cue | 16 ++++++ .../components/sources/generated/redis.cue | 16 ++++++ .../components/sources/generated/socket.cue | 16 ++++++ .../components/sources/generated/stdin.cue | 16 ++++++ .../sources/generated/websocket.cue | 16 ++++++ 60 files changed, 960 insertions(+), 46 deletions(-) create mode 100644 lib/codecs/tests/data/protobuf/Makefile delete mode 100644 lib/codecs/tests/data/protobuf/generate_example.py diff --git a/lib/codecs/src/decoding/format/protobuf.rs b/lib/codecs/src/decoding/format/protobuf.rs index b34acd392d90c..93f7ab6792f54 100644 --- a/lib/codecs/src/decoding/format/protobuf.rs +++ b/lib/codecs/src/decoding/format/protobuf.rs @@ -81,6 +81,17 @@ pub struct ProtobufDeserializerOptions { /// The name of the message type to use for serializing. #[configurable(metadata(docs::examples = "package.Message"))] pub message_type: String, + + /// Use JSON field names (camelCase) instead of protobuf field names (snake_case). + /// + /// When enabled, the deserializer will output fields using their JSON names as defined + /// in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + /// + /// This is useful when working with data that needs to be converted to JSON or + /// when interfacing with systems that use JSON naming conventions. + #[serde(default)] + #[configurable(metadata(docs::examples = true))] + pub use_json_names: bool, } /// Deserializer that builds `Event`s from a byte frame containing protobuf. @@ -166,7 +177,12 @@ impl TryFrom<&ProtobufDeserializerConfig> for ProtobufDeserializer { fn try_from(config: &ProtobufDeserializerConfig) -> vector_common::Result { let message_descriptor = get_message_descriptor(&config.protobuf.desc_file, &config.protobuf.message_type)?; - Ok(Self::new(message_descriptor)) + Ok(Self { + message_descriptor, + options: Options { + use_json_names: config.protobuf.use_json_names, + }, + }) } } diff --git a/lib/codecs/src/encoding/format/protobuf.rs b/lib/codecs/src/encoding/format/protobuf.rs index 1f3d3b7a64939..9858c97671c9d 100644 --- a/lib/codecs/src/encoding/format/protobuf.rs +++ b/lib/codecs/src/encoding/format/protobuf.rs @@ -30,7 +30,9 @@ impl ProtobufSerializerConfig { get_message_descriptor(&self.protobuf.desc_file, &self.protobuf.message_type)?; Ok(ProtobufSerializer { message_descriptor, - options: Options::default(), + options: Options { + use_json_names: self.protobuf.use_json_names, + }, }) } @@ -62,6 +64,17 @@ pub struct ProtobufSerializerOptions { /// The name of the message type to use for serializing. #[configurable(metadata(docs::examples = "package.Message"))] pub message_type: String, + + /// Use JSON field names (camelCase) instead of protobuf field names (snake_case). + /// + /// When enabled, the serializer will look for fields using their JSON names as defined + /// in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + /// + /// This is useful when working with data that has already been converted from JSON or + /// when interfacing with systems that use JSON naming conventions. + #[serde(default)] + #[configurable(metadata(docs::examples = true))] + pub use_json_names: bool, } /// Serializer that converts an `Event` to bytes using the Protobuf format. diff --git a/lib/codecs/tests/data/protobuf/Makefile b/lib/codecs/tests/data/protobuf/Makefile new file mode 100644 index 0000000000000..b23a877c29915 --- /dev/null +++ b/lib/codecs/tests/data/protobuf/Makefile @@ -0,0 +1,51 @@ +# Makefile for generating protobuf test fixtures + +# Default target +all: generate-desc generate-pb + +# Generates .desc descriptor sets for tests +generate-desc: + protoc --proto_path=protos \ + --include_imports \ + --descriptor_set_out=protos/test_protobuf.desc \ + protos/test_protobuf.proto + + protoc --proto_path=protos \ + --include_imports \ + --descriptor_set_out=protos/test_protobuf3.desc \ + protos/test_protobuf3.proto + +# Generates serialized binary .pb test files from .txt input +generate-pb: + protoc --proto_path=protos \ + --encode=test_protobuf.Person \ + protos/test_protobuf.proto \ + < pbs/person_someone.txt > pbs/person_someone.pb + + protoc --proto_path=protos \ + --encode=test_protobuf3.Person \ + protos/test_protobuf3.proto \ + < pbs/person_someone3.txt > pbs/person_someone3.pb + +# Clean generated files +clean: + rm -f protos/*.desc + rm -f pbs/*.pb + +# Help target +help: + @echo "Protobuf Test Fixture Generator" + @echo "" + @echo "Targets:" + @echo " all - Generate both descriptor sets and binary test files (default)" + @echo " generate-desc - Generate .desc descriptor set files from .proto files" + @echo " generate-pb - Generate .pb binary files from .txt text format inputs" + @echo " clean - Remove all generated files" + @echo " help - Show this help message" + @echo "" + @echo "Usage:" + @echo " 1. Edit or add .proto files in protos/" + @echo " 2. Create human-readable .txt files in pbs/" + @echo " 3. Run 'make' to regenerate all test fixtures" + +.PHONY: all generate-desc generate-pb clean help diff --git a/lib/codecs/tests/data/protobuf/README.md b/lib/codecs/tests/data/protobuf/README.md index 7b70fb831b68b..132a384028ca6 100644 --- a/lib/codecs/tests/data/protobuf/README.md +++ b/lib/codecs/tests/data/protobuf/README.md @@ -1,11 +1,12 @@ -# Generate protobuf test file +# Protobuf Test Fixtures -* After modifying a protobuf file e.g. `test_protobuf3.proto`, it needs to be recompiled. -* There are many ways to create protobuf files. We are using `generate_example.py` here. +## Regenerating -```shell -protoc -I ./ -o test_protobuf3.desc ./test_protobuf3.proto -pip install protobuf -protoc --python_out=. ./test_protobuf3.proto -python generate_example.py -``` +After modifying `.proto` or `.txt` files, run `make` (requires `protoc`). + +## Adding New Test Cases + +1. Edit/create `.proto` file in `protos/` +2. Create text format `.txt` file in `pbs/` +3. Update `Makefile` +4. Run `make` diff --git a/lib/codecs/tests/data/protobuf/generate_example.py b/lib/codecs/tests/data/protobuf/generate_example.py deleted file mode 100644 index ac1be2210d433..0000000000000 --- a/lib/codecs/tests/data/protobuf/generate_example.py +++ /dev/null @@ -1,31 +0,0 @@ -from test_protobuf3_pb2 import Person -from google.protobuf import text_format - - -def create_a_person_pb(): - person = Person() - - person.name = "John Doe" - person.id = 1234 - person.email = "johndoe@example.com" - - mobile_phone = person.phones.add() - mobile_phone.number = "1234" - mobile_phone.type = Person.PhoneType.MOBILE - - home_phone = person.phones.add() - home_phone.number = "5678" - home_phone.type = Person.PhoneType.HOME - - person.data["location"] = "unknown" - - with open("a_person_proto3.pb", "wb") as file: - file.write(person.SerializeToString()) - - debug_string = text_format.MessageToString(person) - with open("a_person_proto3_debug.txt", "w") as text_file: - text_file.write(debug_string) - - -if __name__ == "__main__": - create_a_person_pb() diff --git a/lib/codecs/tests/data/protobuf/pbs/person_someone.txt b/lib/codecs/tests/data/protobuf/pbs/person_someone.txt index 72e26e70a16df..4c94c273b5e0a 100644 --- a/lib/codecs/tests/data/protobuf/pbs/person_someone.txt +++ b/lib/codecs/tests/data/protobuf/pbs/person_someone.txt @@ -1,2 +1,4 @@ -debug print of person_someone.pb with prost -Person { name: Some("someone"), id: None, email: None, phones: [PhoneNumber { number: Some("123456"), r#type: None }] } +name: "someone" +phones { + number: "123456" +} diff --git a/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt b/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt index 0a5086c628414..0d97636437456 100644 --- a/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt +++ b/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt @@ -1,2 +1,9 @@ -debug print of person_someone3.pb with prost -Person { name: Some("someone"), id: None, email: None, data: {"data_phone": Home}, phones: [PhoneNumber { number: Some("1234"), r#type: Some(Mobile) }] } +name: "someone" +data { + key: "data_phone" + value: HOME +} +phones { + number: "1234" + type: MOBILE +} diff --git a/lib/codecs/tests/data/protobuf/protos/test_protobuf.desc b/lib/codecs/tests/data/protobuf/protos/test_protobuf.desc index 43e7acf6cf7716af7c2a751c2ece9283a5033f47..658b7f8d6152c0aec6e82cbdb7ea7b638e3c3433 100644 GIT binary patch delta 12 TcmbQw`Gtv@>m$=f=0ZjQ8#@EV literal 1183 zcmaJ<+int36rFQn2KF#890r&|FO;Vyji`Oo_+pbL-fA0S;-j`f^dJ9EkiFDzt}ZWTHf3^34O@W; zL*!mwoxlBX5jv($Ru&45K3~n=hjQ|Y{MYmOI@xT_)AWaVg29q>b791-(-2%bH?GJJjwCl^kPady;(7g9hjb382RHnqshAdE;;h0y{9tx^u!*Fi}O zi|ZAJ-1nQM9I&|~=Qf+Vl1t_xw~Z<^+U9b0or?dYO})%Y*+xTslvQGgZG^g6VeBIe zx)nxx7!50oorDL6r5)&weqPf2L!BKv;Q|N!if8>`RAJb44y$%V9eDh#;yvKgr};lZ z9LY&Gm{cegmH((vDDsONQYaG*4hkjbjgRfQ3Zn;n&U~)C^+COB%?1BpEVC2=Y5{{rq%g!BLa diff --git a/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc b/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc index 9fcfec71b44b8c52c45dbbc3a2b179e8c32d0529..ab2f3ca6ec70d147f61b71e6d3eab293fcfbb708 100644 GIT binary patch delta 21 ccmbQreVK)s>jKM0W)CKgB({R0{E~cQ07EDSE&u=k literal 1429 zcma)6+iKfD5Y=9^vPZti>zicf;`%92@IzBd8|Xt#1L-AA5QWkw<6xDB*p{)Kg8!h; z{h|I!KczFPn*$B>ZO@)FXJ&Rrf?qDQw$WxgS*_!3d~^TpbYxDt_V9N2M}WGH)|+^# zyC9d-MdY&qJ1JjSp+P?x(@o&FGoRzNeZfLJ(`5j5w3yz`ePQH0OdwIuLC&VzsV@iO z#C+pk=;%MUJCLB$iyb_Kk4t@+t%^Xdf z9(922P@`pD6$xirEju1mK@msIf~-RgoCKl~NGLFt0M%M9N7|LuoW|8eTq-ciUAL0U z5mxr(RAyyQ&WT64DO6ygbxLQN5HyoIv=b{~3iaf1l8GR`h9@fp#`o~5%>rY%*Xk7* z-^4pS%I%PD$U#oigc^HxOd+mz3ZC@ceu2@hade!{2|c&{jTrfq|{yFylx$ zc#?);&UPLq4aycxqDkA$R!gEuyPKIvG-;y=Z86i*r!A)~reXM{rZHzU*nlS?2+%x8 ccLx!g2kGu0!mvOmtBMHCgZ{ydGQZx_zvT?XAOHXW diff --git a/lib/codecs/tests/protobuf.rs b/lib/codecs/tests/protobuf.rs index 1d72f34ea6522..b7eaa45351cb4 100644 --- a/lib/codecs/tests/protobuf.rs +++ b/lib/codecs/tests/protobuf.rs @@ -31,6 +31,7 @@ fn build_serializer_pair( protobuf: ProtobufSerializerOptions { desc_file: desc_file.clone(), message_type: message_type.clone(), + use_json_names: false, }, } .build() @@ -39,6 +40,7 @@ fn build_serializer_pair( protobuf: ProtobufDeserializerOptions { desc_file, message_type, + use_json_names: false, }, } .build() @@ -68,3 +70,54 @@ fn roundtrip_coding() { .unwrap(); assert_eq!(events_original, events_encoded); } + +#[test] +fn roundtrip_coding_with_json_names() { + let protobuf_message = + read_protobuf_bin_message(&test_data_dir().join("pbs/person_someone3.pb")); + let desc_file = test_data_dir().join("protos/test_protobuf3.desc"); + let message_type: String = "test_protobuf3.Person".into(); + + // Create serializer with use_json_names enabled + let mut serializer = ProtobufSerializerConfig { + protobuf: ProtobufSerializerOptions { + desc_file: desc_file.clone(), + message_type: message_type.clone(), + use_json_names: true, + }, + } + .build() + .unwrap(); + + // Create deserializer with use_json_names enabled + let deserializer = ProtobufDeserializerConfig { + protobuf: ProtobufDeserializerOptions { + desc_file, + message_type, + use_json_names: true, + }, + } + .build() + .unwrap(); + + // Parse the original message + let events_original = deserializer + .parse(protobuf_message, LogNamespace::Vector) + .unwrap(); + assert_eq!(1, events_original.len()); + + // Encode it back + let mut new_message = BytesMut::new(); + serializer + .encode(events_original[0].clone(), &mut new_message) + .unwrap(); + + // Decode the re-encoded message + let protobuf_message: Bytes = new_message.into(); + let events_encoded = deserializer + .parse(protobuf_message, LogNamespace::Vector) + .unwrap(); + + // Should be the same + assert_eq!(events_original, events_encoded); +} diff --git a/src/components/validation/resources/mod.rs b/src/components/validation/resources/mod.rs index a79100791f6c1..98c36808fe1f8 100644 --- a/src/components/validation/resources/mod.rs +++ b/src/components/validation/resources/mod.rs @@ -157,6 +157,7 @@ fn deserializer_config_to_serializer(config: &DeserializerConfig) -> encoding::S protobuf: vector_lib::codecs::encoding::ProtobufSerializerOptions { desc_file: config.protobuf.desc_file.clone(), message_type: config.protobuf.message_type.clone(), + use_json_names: config.protobuf.use_json_names, }, }) } @@ -229,6 +230,7 @@ fn serializer_config_to_deserializer( protobuf: vector_lib::codecs::decoding::ProtobufDeserializerOptions { desc_file: config.protobuf.desc_file.clone(), message_type: config.protobuf.message_type.clone(), + use_json_names: config.protobuf.use_json_names, }, }) } diff --git a/website/cue/reference/components/sinks/generated/amqp.cue b/website/cue/reference/components/sinks/generated/amqp.cue index 5887fb620c615..6173ee02c12d1 100644 --- a/website/cue/reference/components/sinks/generated/amqp.cue +++ b/website/cue/reference/components/sinks/generated/amqp.cue @@ -397,6 +397,22 @@ generated: components: sinks: amqp: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue b/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue index c1b0e1f494998..fbb69f2f32593 100644 --- a/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue +++ b/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue @@ -593,6 +593,22 @@ generated: components: sinks: aws_cloudwatch_logs: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue b/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue index ff1d1cdec8c85..58df26af4bce7 100644 --- a/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue +++ b/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue @@ -572,6 +572,22 @@ generated: components: sinks: aws_kinesis_firehose: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue b/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue index 150b66142bbec..780d6e1715c47 100644 --- a/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue +++ b/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue @@ -572,6 +572,22 @@ generated: components: sinks: aws_kinesis_streams: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/aws_s3.cue b/website/cue/reference/components/sinks/generated/aws_s3.cue index 0a50a9da454e6..6bfbf5a8adbfa 100644 --- a/website/cue/reference/components/sinks/generated/aws_s3.cue +++ b/website/cue/reference/components/sinks/generated/aws_s3.cue @@ -681,6 +681,22 @@ generated: components: sinks: aws_s3: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/aws_sns.cue b/website/cue/reference/components/sinks/generated/aws_sns.cue index 67e018c83f76e..ee76020dfb4ba 100644 --- a/website/cue/reference/components/sinks/generated/aws_sns.cue +++ b/website/cue/reference/components/sinks/generated/aws_sns.cue @@ -503,6 +503,22 @@ generated: components: sinks: aws_sns: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/aws_sqs.cue b/website/cue/reference/components/sinks/generated/aws_sqs.cue index 626413075a3ef..423d0280336d6 100644 --- a/website/cue/reference/components/sinks/generated/aws_sqs.cue +++ b/website/cue/reference/components/sinks/generated/aws_sqs.cue @@ -503,6 +503,22 @@ generated: components: sinks: aws_sqs: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/azure_blob.cue b/website/cue/reference/components/sinks/generated/azure_blob.cue index 1099e8e686f9f..55443d8334ad8 100644 --- a/website/cue/reference/components/sinks/generated/azure_blob.cue +++ b/website/cue/reference/components/sinks/generated/azure_blob.cue @@ -527,6 +527,22 @@ generated: components: sinks: azure_blob: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/console.cue b/website/cue/reference/components/sinks/generated/console.cue index 01a8b3764f6c7..9b74170c2dddc 100644 --- a/website/cue/reference/components/sinks/generated/console.cue +++ b/website/cue/reference/components/sinks/generated/console.cue @@ -381,6 +381,22 @@ generated: components: sinks: console: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/file.cue b/website/cue/reference/components/sinks/generated/file.cue index 472622b5a4f55..fd6403baf1120 100644 --- a/website/cue/reference/components/sinks/generated/file.cue +++ b/website/cue/reference/components/sinks/generated/file.cue @@ -401,6 +401,22 @@ generated: components: sinks: file: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue b/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue index e4633659e88ce..ba6b4993953ee 100644 --- a/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue +++ b/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue @@ -469,6 +469,22 @@ generated: components: sinks: gcp_chronicle_unstructured: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue b/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue index 0a96d8a53eacf..0eb43b53fe380 100644 --- a/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue +++ b/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue @@ -542,6 +542,22 @@ generated: components: sinks: gcp_cloud_storage: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/gcp_pubsub.cue b/website/cue/reference/components/sinks/generated/gcp_pubsub.cue index fd972d8bd933c..9a1f09ac02f8c 100644 --- a/website/cue/reference/components/sinks/generated/gcp_pubsub.cue +++ b/website/cue/reference/components/sinks/generated/gcp_pubsub.cue @@ -448,6 +448,22 @@ generated: components: sinks: gcp_pubsub: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/http.cue b/website/cue/reference/components/sinks/generated/http.cue index 97d6d17178bd5..059bdf9dfcdd0 100644 --- a/website/cue/reference/components/sinks/generated/http.cue +++ b/website/cue/reference/components/sinks/generated/http.cue @@ -624,6 +624,22 @@ generated: components: sinks: http: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/humio_logs.cue b/website/cue/reference/components/sinks/generated/humio_logs.cue index afe28006824d8..c4e3fb8c26589 100644 --- a/website/cue/reference/components/sinks/generated/humio_logs.cue +++ b/website/cue/reference/components/sinks/generated/humio_logs.cue @@ -447,6 +447,22 @@ generated: components: sinks: humio_logs: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/kafka.cue b/website/cue/reference/components/sinks/generated/kafka.cue index a90c3e1bf0857..98b7d9c9849de 100644 --- a/website/cue/reference/components/sinks/generated/kafka.cue +++ b/website/cue/reference/components/sinks/generated/kafka.cue @@ -436,6 +436,22 @@ generated: components: sinks: kafka: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/loki.cue b/website/cue/reference/components/sinks/generated/loki.cue index b83cd54280f7f..0ca81395ac248 100644 --- a/website/cue/reference/components/sinks/generated/loki.cue +++ b/website/cue/reference/components/sinks/generated/loki.cue @@ -626,6 +626,22 @@ generated: components: sinks: loki: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/mqtt.cue b/website/cue/reference/components/sinks/generated/mqtt.cue index c2d192d35ac3e..eb788c7502542 100644 --- a/website/cue/reference/components/sinks/generated/mqtt.cue +++ b/website/cue/reference/components/sinks/generated/mqtt.cue @@ -391,6 +391,22 @@ generated: components: sinks: mqtt: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/nats.cue b/website/cue/reference/components/sinks/generated/nats.cue index 84cba5611b2af..26841af4a2aa9 100644 --- a/website/cue/reference/components/sinks/generated/nats.cue +++ b/website/cue/reference/components/sinks/generated/nats.cue @@ -481,6 +481,22 @@ generated: components: sinks: nats: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/opentelemetry.cue b/website/cue/reference/components/sinks/generated/opentelemetry.cue index e0b4e672fef2e..969508815a92f 100644 --- a/website/cue/reference/components/sinks/generated/opentelemetry.cue +++ b/website/cue/reference/components/sinks/generated/opentelemetry.cue @@ -627,6 +627,22 @@ generated: components: sinks: opentelemetry: configuration: protocol: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/papertrail.cue b/website/cue/reference/components/sinks/generated/papertrail.cue index 8704ca7a46d57..4c45179c95481 100644 --- a/website/cue/reference/components/sinks/generated/papertrail.cue +++ b/website/cue/reference/components/sinks/generated/papertrail.cue @@ -381,6 +381,22 @@ generated: components: sinks: papertrail: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/pulsar.cue b/website/cue/reference/components/sinks/generated/pulsar.cue index c5545a0f17082..658c087934174 100644 --- a/website/cue/reference/components/sinks/generated/pulsar.cue +++ b/website/cue/reference/components/sinks/generated/pulsar.cue @@ -515,6 +515,22 @@ generated: components: sinks: pulsar: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/redis.cue b/website/cue/reference/components/sinks/generated/redis.cue index 2f5ac1cc0890b..a23fd98b26ba5 100644 --- a/website/cue/reference/components/sinks/generated/redis.cue +++ b/website/cue/reference/components/sinks/generated/redis.cue @@ -440,6 +440,22 @@ generated: components: sinks: redis: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/socket.cue b/website/cue/reference/components/sinks/generated/socket.cue index 17531379e6155..2622d87f70c90 100644 --- a/website/cue/reference/components/sinks/generated/socket.cue +++ b/website/cue/reference/components/sinks/generated/socket.cue @@ -393,6 +393,22 @@ generated: components: sinks: socket: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue b/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue index 1a68a339a166d..13dd06179a300 100644 --- a/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue +++ b/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue @@ -497,6 +497,22 @@ generated: components: sinks: splunk_hec_logs: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/webhdfs.cue b/website/cue/reference/components/sinks/generated/webhdfs.cue index 3a6b5703f5c7f..4f2a6176a7bbb 100644 --- a/website/cue/reference/components/sinks/generated/webhdfs.cue +++ b/website/cue/reference/components/sinks/generated/webhdfs.cue @@ -447,6 +447,22 @@ generated: components: sinks: webhdfs: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/websocket.cue b/website/cue/reference/components/sinks/generated/websocket.cue index a6f86e05d4ff2..bafab18935fca 100644 --- a/website/cue/reference/components/sinks/generated/websocket.cue +++ b/website/cue/reference/components/sinks/generated/websocket.cue @@ -553,6 +553,22 @@ generated: components: sinks: websocket: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/websocket_server.cue b/website/cue/reference/components/sinks/generated/websocket_server.cue index ca04a07cfee13..bff8ce7051fb7 100644 --- a/website/cue/reference/components/sinks/generated/websocket_server.cue +++ b/website/cue/reference/components/sinks/generated/websocket_server.cue @@ -437,6 +437,22 @@ generated: components: sinks: websocket_server: configuration: { required: true type: string: examples: ["package.Message"] } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the serializer will look for fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that has already been converted from JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } timestamp_format: { @@ -718,6 +734,22 @@ generated: components: sinks: websocket_server: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/amqp.cue b/website/cue/reference/components/sources/generated/amqp.cue index f58cf369183f9..108b6c843902b 100644 --- a/website/cue/reference/components/sources/generated/amqp.cue +++ b/website/cue/reference/components/sources/generated/amqp.cue @@ -251,6 +251,22 @@ generated: components: sources: amqp: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue b/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue index 94c1b7627100c..e04cd12d995ae 100644 --- a/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue +++ b/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue @@ -254,6 +254,22 @@ generated: components: sources: aws_kinesis_firehose: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/aws_s3.cue b/website/cue/reference/components/sources/generated/aws_s3.cue index 8440c4dd356a8..184f7246b8e25 100644 --- a/website/cue/reference/components/sources/generated/aws_s3.cue +++ b/website/cue/reference/components/sources/generated/aws_s3.cue @@ -369,6 +369,22 @@ generated: components: sources: aws_s3: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/aws_sqs.cue b/website/cue/reference/components/sources/generated/aws_sqs.cue index cf235becb1004..2fa31c13ce912 100644 --- a/website/cue/reference/components/sources/generated/aws_sqs.cue +++ b/website/cue/reference/components/sources/generated/aws_sqs.cue @@ -364,6 +364,22 @@ generated: components: sources: aws_sqs: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/datadog_agent.cue b/website/cue/reference/components/sources/generated/datadog_agent.cue index 8989ef555209f..d2d6dedf7c724 100644 --- a/website/cue/reference/components/sources/generated/datadog_agent.cue +++ b/website/cue/reference/components/sources/generated/datadog_agent.cue @@ -236,6 +236,22 @@ generated: components: sources: datadog_agent: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/demo_logs.cue b/website/cue/reference/components/sources/generated/demo_logs.cue index e83ce34c9859c..7865ac4ac1123 100644 --- a/website/cue/reference/components/sources/generated/demo_logs.cue +++ b/website/cue/reference/components/sources/generated/demo_logs.cue @@ -215,6 +215,22 @@ generated: components: sources: demo_logs: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/exec.cue b/website/cue/reference/components/sources/generated/exec.cue index 6cd6464747210..d1c815fd43fd6 100644 --- a/website/cue/reference/components/sources/generated/exec.cue +++ b/website/cue/reference/components/sources/generated/exec.cue @@ -216,6 +216,22 @@ generated: components: sources: exec: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/file_descriptor.cue b/website/cue/reference/components/sources/generated/file_descriptor.cue index c5f26e784d44e..6aeedab9db0cd 100644 --- a/website/cue/reference/components/sources/generated/file_descriptor.cue +++ b/website/cue/reference/components/sources/generated/file_descriptor.cue @@ -206,6 +206,22 @@ generated: components: sources: file_descriptor: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/gcp_pubsub.cue b/website/cue/reference/components/sources/generated/gcp_pubsub.cue index f1bbab75a7213..55b95ea3485b5 100644 --- a/website/cue/reference/components/sources/generated/gcp_pubsub.cue +++ b/website/cue/reference/components/sources/generated/gcp_pubsub.cue @@ -282,6 +282,22 @@ generated: components: sources: gcp_pubsub: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/heroku_logs.cue b/website/cue/reference/components/sources/generated/heroku_logs.cue index ea0ddc00a973b..ce9f68bb5e448 100644 --- a/website/cue/reference/components/sources/generated/heroku_logs.cue +++ b/website/cue/reference/components/sources/generated/heroku_logs.cue @@ -279,6 +279,22 @@ generated: components: sources: heroku_logs: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/http.cue b/website/cue/reference/components/sources/generated/http.cue index e27794f8dcc91..7218a1e5b0082 100644 --- a/website/cue/reference/components/sources/generated/http.cue +++ b/website/cue/reference/components/sources/generated/http.cue @@ -280,6 +280,22 @@ generated: components: sources: http: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/http_client.cue b/website/cue/reference/components/sources/generated/http_client.cue index 70ed73974c6ce..38ac3e1bf2ab3 100644 --- a/website/cue/reference/components/sources/generated/http_client.cue +++ b/website/cue/reference/components/sources/generated/http_client.cue @@ -378,6 +378,22 @@ generated: components: sources: http_client: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/http_server.cue b/website/cue/reference/components/sources/generated/http_server.cue index 670032a450bb1..e47dabb834afa 100644 --- a/website/cue/reference/components/sources/generated/http_server.cue +++ b/website/cue/reference/components/sources/generated/http_server.cue @@ -280,6 +280,22 @@ generated: components: sources: http_server: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/kafka.cue b/website/cue/reference/components/sources/generated/kafka.cue index df12717871580..739fca612e635 100644 --- a/website/cue/reference/components/sources/generated/kafka.cue +++ b/website/cue/reference/components/sources/generated/kafka.cue @@ -260,6 +260,22 @@ generated: components: sources: kafka: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/mqtt.cue b/website/cue/reference/components/sources/generated/mqtt.cue index 65b2e2042593a..1ca282179cf9b 100644 --- a/website/cue/reference/components/sources/generated/mqtt.cue +++ b/website/cue/reference/components/sources/generated/mqtt.cue @@ -211,6 +211,22 @@ generated: components: sources: mqtt: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/nats.cue b/website/cue/reference/components/sources/generated/nats.cue index ed5358b8fa366..b7675ba1162e1 100644 --- a/website/cue/reference/components/sources/generated/nats.cue +++ b/website/cue/reference/components/sources/generated/nats.cue @@ -303,6 +303,22 @@ generated: components: sources: nats: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/pulsar.cue b/website/cue/reference/components/sources/generated/pulsar.cue index d9d573de44744..7558f4aebfeba 100644 --- a/website/cue/reference/components/sources/generated/pulsar.cue +++ b/website/cue/reference/components/sources/generated/pulsar.cue @@ -309,6 +309,22 @@ generated: components: sources: pulsar: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/redis.cue b/website/cue/reference/components/sources/generated/redis.cue index 00b06d665c21f..ffb26acdc5300 100644 --- a/website/cue/reference/components/sources/generated/redis.cue +++ b/website/cue/reference/components/sources/generated/redis.cue @@ -221,6 +221,22 @@ generated: components: sources: redis: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/socket.cue b/website/cue/reference/components/sources/generated/socket.cue index 1dfca4b2c4769..05d06ed829272 100644 --- a/website/cue/reference/components/sources/generated/socket.cue +++ b/website/cue/reference/components/sources/generated/socket.cue @@ -223,6 +223,22 @@ generated: components: sources: socket: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/stdin.cue b/website/cue/reference/components/sources/generated/stdin.cue index 954d24206ff34..25ce7543cb1d2 100644 --- a/website/cue/reference/components/sources/generated/stdin.cue +++ b/website/cue/reference/components/sources/generated/stdin.cue @@ -206,6 +206,22 @@ generated: components: sources: stdin: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/websocket.cue b/website/cue/reference/components/sources/generated/websocket.cue index b502a1a202814..58b64691cb40c 100644 --- a/website/cue/reference/components/sources/generated/websocket.cue +++ b/website/cue/reference/components/sources/generated/websocket.cue @@ -386,6 +386,22 @@ generated: components: sources: websocket: configuration: { examples: ["package.Message"] } } + use_json_names: { + description: """ + Use JSON field names (camelCase) instead of protobuf field names (snake_case). + + When enabled, the deserializer will output fields using their JSON names as defined + in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + + This is useful when working with data that needs to be converted to JSON or + when interfacing with systems that use JSON naming conventions. + """ + required: false + type: bool: { + default: false + examples: [true] + } + } } } syslog: { From d01af567c5498672243665d431b8e35d1ffd1cf7 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 14:17:57 -0400 Subject: [PATCH 2/8] changelog --- changelog.d/protobuf_use_json_names.enhancement.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog.d/protobuf_use_json_names.enhancement.md diff --git a/changelog.d/protobuf_use_json_names.enhancement.md b/changelog.d/protobuf_use_json_names.enhancement.md new file mode 100644 index 0000000000000..2e3a3d30e2b88 --- /dev/null +++ b/changelog.d/protobuf_use_json_names.enhancement.md @@ -0,0 +1,5 @@ +Added `use_json_names` option to protobuf encoding and decoding. +When enabled, the codec uses JSON field names (camelCase) instead of protobuf field names (snake_case). +This is useful when working with data that uses JSON naming conventions. + +authors: pront From 578575f5c9d49cd4704bc0dd5f0fe15f1d0b5eaa Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 14:21:24 -0400 Subject: [PATCH 3/8] update docs --- .../en/highlights/2025-09-23-otlp-support.md | 15 ++------- .../components/sources/opentelemetry.cue | 31 +------------------ 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/website/content/en/highlights/2025-09-23-otlp-support.md b/website/content/en/highlights/2025-09-23-otlp-support.md index c77a212f8be96..b12c08a6ffa5d 100644 --- a/website/content/en/highlights/2025-09-23-otlp-support.md +++ b/website/content/en/highlights/2025-09-23-otlp-support.md @@ -44,19 +44,9 @@ sinks: uri: http://otel-collector-sink:5318/v1/logs method: post encoding: - codec: json - framing: - method: newline_delimited - batch: - max_events: 1 - request: - headers: - content-type: application/json + codec: otlp ``` -**Note:** This setup is affected by a [known issue](https://github.com/vectordotdev/vector/issues/22054). -We plan to improve batching for this sink in future Vector versions. - ## Example Configuration 2 Here is another pipeline configuration that can achieve the same as the above: @@ -75,6 +65,7 @@ otel_sink: protobuf: desc_file: path/to/opentelemetry-proto.desc message_type: opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + use_json_names: true framing: method: 'bytes' request: @@ -91,5 +82,3 @@ The `desc` file was generated with the following command: --descriptor_set_out=opentelemetry-proto.desc \\ $(find /path/to/vector/lib/opentelemetry-proto/src/proto/opentelemetry-proto -name '*.proto') ``` - -**Note:** In the future, we can simplify the `opentelemetry` sink UX further, eliminating the need to compile proto files. diff --git a/website/cue/reference/components/sources/opentelemetry.cue b/website/cue/reference/components/sources/opentelemetry.cue index b18a3474e382b..928e4fa03ede4 100644 --- a/website/cue/reference/components/sources/opentelemetry.cue +++ b/website/cue/reference/components/sources/opentelemetry.cue @@ -260,36 +260,7 @@ components: sources: opentelemetry: { metrics are converted to Vector log events while preserving the OTLP format. This prohibits the use of metric transforms like `aggregate` but it enables easy shipping to OTEL collectors. - ```yaml - sources: - source0: - type: opentelemetry - grpc: - address: 0.0.0.0:4317 - http: - address: 0.0.0.0:4318 - use_otlp_decoding: true - sinks: - otel_sink: - inputs: - - source0.logs - type: opentelemetry - protocol: - type: http - uri: http://otel-collector-sink:5318/v1/logs - method: post - encoding: - codec: json - framing: - method: newline_delimited - batch: - max_events: 1 - request: - headers: - content-type: application/json - ``` - - Here is another sink configuration that can achieve the same: + The recommended `opentelemetry` sink configuration is the following: ```yaml otel_sink: inputs: From 311e81a1684e751732896186d267474d6c7a5647 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 14:41:00 -0400 Subject: [PATCH 4/8] docs updates --- lib/codecs/src/encoding/format/protobuf.rs | 3 +-- src/sinks/util/encoding.rs | 1 + website/cue/reference/components/sinks/generated/amqp.cue | 5 +---- .../components/sinks/generated/aws_cloudwatch_logs.cue | 5 +---- .../components/sinks/generated/aws_kinesis_firehose.cue | 5 +---- .../components/sinks/generated/aws_kinesis_streams.cue | 5 +---- website/cue/reference/components/sinks/generated/aws_s3.cue | 5 +---- website/cue/reference/components/sinks/generated/aws_sns.cue | 5 +---- website/cue/reference/components/sinks/generated/aws_sqs.cue | 5 +---- .../cue/reference/components/sinks/generated/azure_blob.cue | 5 +---- website/cue/reference/components/sinks/generated/console.cue | 5 +---- website/cue/reference/components/sinks/generated/file.cue | 5 +---- .../sinks/generated/gcp_chronicle_unstructured.cue | 5 +---- .../components/sinks/generated/gcp_cloud_storage.cue | 5 +---- .../cue/reference/components/sinks/generated/gcp_pubsub.cue | 5 +---- website/cue/reference/components/sinks/generated/http.cue | 5 +---- .../cue/reference/components/sinks/generated/humio_logs.cue | 5 +---- website/cue/reference/components/sinks/generated/kafka.cue | 5 +---- website/cue/reference/components/sinks/generated/loki.cue | 5 +---- website/cue/reference/components/sinks/generated/mqtt.cue | 5 +---- website/cue/reference/components/sinks/generated/nats.cue | 5 +---- .../reference/components/sinks/generated/opentelemetry.cue | 5 +---- .../cue/reference/components/sinks/generated/papertrail.cue | 5 +---- website/cue/reference/components/sinks/generated/pulsar.cue | 5 +---- website/cue/reference/components/sinks/generated/redis.cue | 5 +---- website/cue/reference/components/sinks/generated/socket.cue | 5 +---- .../reference/components/sinks/generated/splunk_hec_logs.cue | 5 +---- website/cue/reference/components/sinks/generated/webhdfs.cue | 5 +---- .../cue/reference/components/sinks/generated/websocket.cue | 5 +---- .../components/sinks/generated/websocket_server.cue | 5 +---- 30 files changed, 30 insertions(+), 114 deletions(-) diff --git a/lib/codecs/src/encoding/format/protobuf.rs b/lib/codecs/src/encoding/format/protobuf.rs index 9858c97671c9d..9c642f5b2533c 100644 --- a/lib/codecs/src/encoding/format/protobuf.rs +++ b/lib/codecs/src/encoding/format/protobuf.rs @@ -72,8 +72,7 @@ pub struct ProtobufSerializerOptions { /// /// This is useful when working with data that has already been converted from JSON or /// when interfacing with systems that use JSON naming conventions. - #[serde(default)] - #[configurable(metadata(docs::examples = true))] + #[serde(default, skip_serializing_if = "vector_core::serde::is_default")] pub use_json_names: bool, } diff --git a/src/sinks/util/encoding.rs b/src/sinks/util/encoding.rs index 2116a946d96f3..9cb28fbab6cb3 100644 --- a/src/sinks/util/encoding.rs +++ b/src/sinks/util/encoding.rs @@ -406,6 +406,7 @@ mod tests { protobuf: ProtobufSerializerOptions { desc_file: test_data_dir().join("test_proto.desc"), message_type: "test_proto.User".to_string(), + ..Default::default() }, }; diff --git a/website/cue/reference/components/sinks/generated/amqp.cue b/website/cue/reference/components/sinks/generated/amqp.cue index 6173ee02c12d1..9b9e7f090adde 100644 --- a/website/cue/reference/components/sinks/generated/amqp.cue +++ b/website/cue/reference/components/sinks/generated/amqp.cue @@ -408,10 +408,7 @@ generated: components: sinks: amqp: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue b/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue index fbb69f2f32593..de9d5d9bfaa0f 100644 --- a/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue +++ b/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue @@ -604,10 +604,7 @@ generated: components: sinks: aws_cloudwatch_logs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue b/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue index 58df26af4bce7..1862d368fdb72 100644 --- a/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue +++ b/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue @@ -583,10 +583,7 @@ generated: components: sinks: aws_kinesis_firehose: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue b/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue index 780d6e1715c47..8b8937a7ae4cc 100644 --- a/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue +++ b/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue @@ -583,10 +583,7 @@ generated: components: sinks: aws_kinesis_streams: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/aws_s3.cue b/website/cue/reference/components/sinks/generated/aws_s3.cue index 6bfbf5a8adbfa..4afe23c86ee2f 100644 --- a/website/cue/reference/components/sinks/generated/aws_s3.cue +++ b/website/cue/reference/components/sinks/generated/aws_s3.cue @@ -692,10 +692,7 @@ generated: components: sinks: aws_s3: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/aws_sns.cue b/website/cue/reference/components/sinks/generated/aws_sns.cue index ee76020dfb4ba..67bb063b5c718 100644 --- a/website/cue/reference/components/sinks/generated/aws_sns.cue +++ b/website/cue/reference/components/sinks/generated/aws_sns.cue @@ -514,10 +514,7 @@ generated: components: sinks: aws_sns: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/aws_sqs.cue b/website/cue/reference/components/sinks/generated/aws_sqs.cue index 423d0280336d6..71c88a27b99fb 100644 --- a/website/cue/reference/components/sinks/generated/aws_sqs.cue +++ b/website/cue/reference/components/sinks/generated/aws_sqs.cue @@ -514,10 +514,7 @@ generated: components: sinks: aws_sqs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/azure_blob.cue b/website/cue/reference/components/sinks/generated/azure_blob.cue index 55443d8334ad8..116e67e78d0c9 100644 --- a/website/cue/reference/components/sinks/generated/azure_blob.cue +++ b/website/cue/reference/components/sinks/generated/azure_blob.cue @@ -538,10 +538,7 @@ generated: components: sinks: azure_blob: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/console.cue b/website/cue/reference/components/sinks/generated/console.cue index 9b74170c2dddc..1897fe19da403 100644 --- a/website/cue/reference/components/sinks/generated/console.cue +++ b/website/cue/reference/components/sinks/generated/console.cue @@ -392,10 +392,7 @@ generated: components: sinks: console: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/file.cue b/website/cue/reference/components/sinks/generated/file.cue index fd6403baf1120..6094a61a439a9 100644 --- a/website/cue/reference/components/sinks/generated/file.cue +++ b/website/cue/reference/components/sinks/generated/file.cue @@ -412,10 +412,7 @@ generated: components: sinks: file: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue b/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue index ba6b4993953ee..2ca4b9df06b2a 100644 --- a/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue +++ b/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue @@ -480,10 +480,7 @@ generated: components: sinks: gcp_chronicle_unstructured: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue b/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue index 0eb43b53fe380..77a5787640792 100644 --- a/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue +++ b/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue @@ -553,10 +553,7 @@ generated: components: sinks: gcp_cloud_storage: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/gcp_pubsub.cue b/website/cue/reference/components/sinks/generated/gcp_pubsub.cue index 9a1f09ac02f8c..5c1af6e6157dd 100644 --- a/website/cue/reference/components/sinks/generated/gcp_pubsub.cue +++ b/website/cue/reference/components/sinks/generated/gcp_pubsub.cue @@ -459,10 +459,7 @@ generated: components: sinks: gcp_pubsub: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/http.cue b/website/cue/reference/components/sinks/generated/http.cue index 059bdf9dfcdd0..23401034ceb5f 100644 --- a/website/cue/reference/components/sinks/generated/http.cue +++ b/website/cue/reference/components/sinks/generated/http.cue @@ -635,10 +635,7 @@ generated: components: sinks: http: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/humio_logs.cue b/website/cue/reference/components/sinks/generated/humio_logs.cue index c4e3fb8c26589..e835ee941ff64 100644 --- a/website/cue/reference/components/sinks/generated/humio_logs.cue +++ b/website/cue/reference/components/sinks/generated/humio_logs.cue @@ -458,10 +458,7 @@ generated: components: sinks: humio_logs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/kafka.cue b/website/cue/reference/components/sinks/generated/kafka.cue index 98b7d9c9849de..4bcabf223fe3e 100644 --- a/website/cue/reference/components/sinks/generated/kafka.cue +++ b/website/cue/reference/components/sinks/generated/kafka.cue @@ -447,10 +447,7 @@ generated: components: sinks: kafka: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/loki.cue b/website/cue/reference/components/sinks/generated/loki.cue index 0ca81395ac248..56dcdbdc499fd 100644 --- a/website/cue/reference/components/sinks/generated/loki.cue +++ b/website/cue/reference/components/sinks/generated/loki.cue @@ -637,10 +637,7 @@ generated: components: sinks: loki: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/mqtt.cue b/website/cue/reference/components/sinks/generated/mqtt.cue index eb788c7502542..c0ac4d4eab31c 100644 --- a/website/cue/reference/components/sinks/generated/mqtt.cue +++ b/website/cue/reference/components/sinks/generated/mqtt.cue @@ -402,10 +402,7 @@ generated: components: sinks: mqtt: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/nats.cue b/website/cue/reference/components/sinks/generated/nats.cue index 26841af4a2aa9..ae90f43c8495f 100644 --- a/website/cue/reference/components/sinks/generated/nats.cue +++ b/website/cue/reference/components/sinks/generated/nats.cue @@ -492,10 +492,7 @@ generated: components: sinks: nats: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/opentelemetry.cue b/website/cue/reference/components/sinks/generated/opentelemetry.cue index 969508815a92f..be8a3da018b7c 100644 --- a/website/cue/reference/components/sinks/generated/opentelemetry.cue +++ b/website/cue/reference/components/sinks/generated/opentelemetry.cue @@ -638,10 +638,7 @@ generated: components: sinks: opentelemetry: configuration: protocol: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/papertrail.cue b/website/cue/reference/components/sinks/generated/papertrail.cue index 4c45179c95481..6c1d34575fcd7 100644 --- a/website/cue/reference/components/sinks/generated/papertrail.cue +++ b/website/cue/reference/components/sinks/generated/papertrail.cue @@ -392,10 +392,7 @@ generated: components: sinks: papertrail: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/pulsar.cue b/website/cue/reference/components/sinks/generated/pulsar.cue index 658c087934174..9239c5acf67d1 100644 --- a/website/cue/reference/components/sinks/generated/pulsar.cue +++ b/website/cue/reference/components/sinks/generated/pulsar.cue @@ -526,10 +526,7 @@ generated: components: sinks: pulsar: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/redis.cue b/website/cue/reference/components/sinks/generated/redis.cue index a23fd98b26ba5..20c876e36ac65 100644 --- a/website/cue/reference/components/sinks/generated/redis.cue +++ b/website/cue/reference/components/sinks/generated/redis.cue @@ -451,10 +451,7 @@ generated: components: sinks: redis: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/socket.cue b/website/cue/reference/components/sinks/generated/socket.cue index 2622d87f70c90..e68df16632202 100644 --- a/website/cue/reference/components/sinks/generated/socket.cue +++ b/website/cue/reference/components/sinks/generated/socket.cue @@ -404,10 +404,7 @@ generated: components: sinks: socket: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue b/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue index 13dd06179a300..fb39c990129dd 100644 --- a/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue +++ b/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue @@ -508,10 +508,7 @@ generated: components: sinks: splunk_hec_logs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/webhdfs.cue b/website/cue/reference/components/sinks/generated/webhdfs.cue index 4f2a6176a7bbb..ffacf3fcd8948 100644 --- a/website/cue/reference/components/sinks/generated/webhdfs.cue +++ b/website/cue/reference/components/sinks/generated/webhdfs.cue @@ -458,10 +458,7 @@ generated: components: sinks: webhdfs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/websocket.cue b/website/cue/reference/components/sinks/generated/websocket.cue index bafab18935fca..a7275bf42a1d7 100644 --- a/website/cue/reference/components/sinks/generated/websocket.cue +++ b/website/cue/reference/components/sinks/generated/websocket.cue @@ -564,10 +564,7 @@ generated: components: sinks: websocket: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sinks/generated/websocket_server.cue b/website/cue/reference/components/sinks/generated/websocket_server.cue index bff8ce7051fb7..99c1982048706 100644 --- a/website/cue/reference/components/sinks/generated/websocket_server.cue +++ b/website/cue/reference/components/sinks/generated/websocket_server.cue @@ -448,10 +448,7 @@ generated: components: sinks: websocket_server: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } From b3683bdc47d676b7463285cc06b262b275e1afdf Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 15:13:46 -0400 Subject: [PATCH 5/8] fix docs --- lib/codecs/src/decoding/format/protobuf.rs | 3 +-- .../components/sinks/generated/websocket_server.cue | 5 +---- website/cue/reference/components/sources/generated/amqp.cue | 5 +---- .../components/sources/generated/aws_kinesis_firehose.cue | 5 +---- .../cue/reference/components/sources/generated/aws_s3.cue | 5 +---- .../cue/reference/components/sources/generated/aws_sqs.cue | 5 +---- .../reference/components/sources/generated/datadog_agent.cue | 5 +---- .../cue/reference/components/sources/generated/demo_logs.cue | 5 +---- website/cue/reference/components/sources/generated/exec.cue | 5 +---- .../components/sources/generated/file_descriptor.cue | 5 +---- .../reference/components/sources/generated/gcp_pubsub.cue | 5 +---- .../reference/components/sources/generated/heroku_logs.cue | 5 +---- website/cue/reference/components/sources/generated/http.cue | 5 +---- .../reference/components/sources/generated/http_client.cue | 5 +---- .../reference/components/sources/generated/http_server.cue | 5 +---- website/cue/reference/components/sources/generated/kafka.cue | 5 +---- website/cue/reference/components/sources/generated/mqtt.cue | 5 +---- website/cue/reference/components/sources/generated/nats.cue | 5 +---- .../cue/reference/components/sources/generated/pulsar.cue | 5 +---- website/cue/reference/components/sources/generated/redis.cue | 5 +---- .../cue/reference/components/sources/generated/socket.cue | 5 +---- website/cue/reference/components/sources/generated/stdin.cue | 5 +---- .../cue/reference/components/sources/generated/websocket.cue | 5 +---- 23 files changed, 23 insertions(+), 90 deletions(-) diff --git a/lib/codecs/src/decoding/format/protobuf.rs b/lib/codecs/src/decoding/format/protobuf.rs index 93f7ab6792f54..eb00dd74bb160 100644 --- a/lib/codecs/src/decoding/format/protobuf.rs +++ b/lib/codecs/src/decoding/format/protobuf.rs @@ -89,8 +89,7 @@ pub struct ProtobufDeserializerOptions { /// /// This is useful when working with data that needs to be converted to JSON or /// when interfacing with systems that use JSON naming conventions. - #[serde(default)] - #[configurable(metadata(docs::examples = true))] + #[serde(default, skip_serializing_if = "vector_core::serde::is_default")] pub use_json_names: bool, } diff --git a/website/cue/reference/components/sinks/generated/websocket_server.cue b/website/cue/reference/components/sinks/generated/websocket_server.cue index 99c1982048706..45a726f01faba 100644 --- a/website/cue/reference/components/sinks/generated/websocket_server.cue +++ b/website/cue/reference/components/sinks/generated/websocket_server.cue @@ -742,10 +742,7 @@ generated: components: sinks: websocket_server: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/amqp.cue b/website/cue/reference/components/sources/generated/amqp.cue index 108b6c843902b..f6fff4c572fff 100644 --- a/website/cue/reference/components/sources/generated/amqp.cue +++ b/website/cue/reference/components/sources/generated/amqp.cue @@ -262,10 +262,7 @@ generated: components: sources: amqp: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue b/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue index e04cd12d995ae..bcd2b5dfbc295 100644 --- a/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue +++ b/website/cue/reference/components/sources/generated/aws_kinesis_firehose.cue @@ -265,10 +265,7 @@ generated: components: sources: aws_kinesis_firehose: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/aws_s3.cue b/website/cue/reference/components/sources/generated/aws_s3.cue index 184f7246b8e25..96efca2fbdc3a 100644 --- a/website/cue/reference/components/sources/generated/aws_s3.cue +++ b/website/cue/reference/components/sources/generated/aws_s3.cue @@ -380,10 +380,7 @@ generated: components: sources: aws_s3: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/aws_sqs.cue b/website/cue/reference/components/sources/generated/aws_sqs.cue index 2fa31c13ce912..b077e2a842476 100644 --- a/website/cue/reference/components/sources/generated/aws_sqs.cue +++ b/website/cue/reference/components/sources/generated/aws_sqs.cue @@ -375,10 +375,7 @@ generated: components: sources: aws_sqs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/datadog_agent.cue b/website/cue/reference/components/sources/generated/datadog_agent.cue index d2d6dedf7c724..7c54aed47adf8 100644 --- a/website/cue/reference/components/sources/generated/datadog_agent.cue +++ b/website/cue/reference/components/sources/generated/datadog_agent.cue @@ -247,10 +247,7 @@ generated: components: sources: datadog_agent: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/demo_logs.cue b/website/cue/reference/components/sources/generated/demo_logs.cue index 7865ac4ac1123..3bb3c6dcd1375 100644 --- a/website/cue/reference/components/sources/generated/demo_logs.cue +++ b/website/cue/reference/components/sources/generated/demo_logs.cue @@ -226,10 +226,7 @@ generated: components: sources: demo_logs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/exec.cue b/website/cue/reference/components/sources/generated/exec.cue index d1c815fd43fd6..cea3a3594d12c 100644 --- a/website/cue/reference/components/sources/generated/exec.cue +++ b/website/cue/reference/components/sources/generated/exec.cue @@ -227,10 +227,7 @@ generated: components: sources: exec: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/file_descriptor.cue b/website/cue/reference/components/sources/generated/file_descriptor.cue index 6aeedab9db0cd..0dc15154b51fd 100644 --- a/website/cue/reference/components/sources/generated/file_descriptor.cue +++ b/website/cue/reference/components/sources/generated/file_descriptor.cue @@ -217,10 +217,7 @@ generated: components: sources: file_descriptor: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/gcp_pubsub.cue b/website/cue/reference/components/sources/generated/gcp_pubsub.cue index 55b95ea3485b5..27ba5875205e0 100644 --- a/website/cue/reference/components/sources/generated/gcp_pubsub.cue +++ b/website/cue/reference/components/sources/generated/gcp_pubsub.cue @@ -293,10 +293,7 @@ generated: components: sources: gcp_pubsub: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/heroku_logs.cue b/website/cue/reference/components/sources/generated/heroku_logs.cue index ce9f68bb5e448..bee8afc69c1d4 100644 --- a/website/cue/reference/components/sources/generated/heroku_logs.cue +++ b/website/cue/reference/components/sources/generated/heroku_logs.cue @@ -290,10 +290,7 @@ generated: components: sources: heroku_logs: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/http.cue b/website/cue/reference/components/sources/generated/http.cue index 7218a1e5b0082..b56fed721d495 100644 --- a/website/cue/reference/components/sources/generated/http.cue +++ b/website/cue/reference/components/sources/generated/http.cue @@ -291,10 +291,7 @@ generated: components: sources: http: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/http_client.cue b/website/cue/reference/components/sources/generated/http_client.cue index 38ac3e1bf2ab3..972f4365ad90e 100644 --- a/website/cue/reference/components/sources/generated/http_client.cue +++ b/website/cue/reference/components/sources/generated/http_client.cue @@ -389,10 +389,7 @@ generated: components: sources: http_client: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/http_server.cue b/website/cue/reference/components/sources/generated/http_server.cue index e47dabb834afa..a0bfcc5ac1ab7 100644 --- a/website/cue/reference/components/sources/generated/http_server.cue +++ b/website/cue/reference/components/sources/generated/http_server.cue @@ -291,10 +291,7 @@ generated: components: sources: http_server: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/kafka.cue b/website/cue/reference/components/sources/generated/kafka.cue index 739fca612e635..54983a73fee94 100644 --- a/website/cue/reference/components/sources/generated/kafka.cue +++ b/website/cue/reference/components/sources/generated/kafka.cue @@ -271,10 +271,7 @@ generated: components: sources: kafka: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/mqtt.cue b/website/cue/reference/components/sources/generated/mqtt.cue index 1ca282179cf9b..ca75a35c72198 100644 --- a/website/cue/reference/components/sources/generated/mqtt.cue +++ b/website/cue/reference/components/sources/generated/mqtt.cue @@ -222,10 +222,7 @@ generated: components: sources: mqtt: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/nats.cue b/website/cue/reference/components/sources/generated/nats.cue index b7675ba1162e1..21438b4bf269d 100644 --- a/website/cue/reference/components/sources/generated/nats.cue +++ b/website/cue/reference/components/sources/generated/nats.cue @@ -314,10 +314,7 @@ generated: components: sources: nats: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/pulsar.cue b/website/cue/reference/components/sources/generated/pulsar.cue index 7558f4aebfeba..f607cb5d971df 100644 --- a/website/cue/reference/components/sources/generated/pulsar.cue +++ b/website/cue/reference/components/sources/generated/pulsar.cue @@ -320,10 +320,7 @@ generated: components: sources: pulsar: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/redis.cue b/website/cue/reference/components/sources/generated/redis.cue index ffb26acdc5300..17249ecfb1cf3 100644 --- a/website/cue/reference/components/sources/generated/redis.cue +++ b/website/cue/reference/components/sources/generated/redis.cue @@ -232,10 +232,7 @@ generated: components: sources: redis: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/socket.cue b/website/cue/reference/components/sources/generated/socket.cue index 05d06ed829272..fbd20dfefb4bc 100644 --- a/website/cue/reference/components/sources/generated/socket.cue +++ b/website/cue/reference/components/sources/generated/socket.cue @@ -234,10 +234,7 @@ generated: components: sources: socket: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/stdin.cue b/website/cue/reference/components/sources/generated/stdin.cue index 25ce7543cb1d2..28bb7148b9cc5 100644 --- a/website/cue/reference/components/sources/generated/stdin.cue +++ b/website/cue/reference/components/sources/generated/stdin.cue @@ -217,10 +217,7 @@ generated: components: sources: stdin: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } diff --git a/website/cue/reference/components/sources/generated/websocket.cue b/website/cue/reference/components/sources/generated/websocket.cue index 58b64691cb40c..afd4b11c06ee7 100644 --- a/website/cue/reference/components/sources/generated/websocket.cue +++ b/website/cue/reference/components/sources/generated/websocket.cue @@ -397,10 +397,7 @@ generated: components: sources: websocket: configuration: { when interfacing with systems that use JSON naming conventions. """ required: false - type: bool: { - default: false - examples: [true] - } + type: bool: default: false } } } From eea0be4329c32522c258e00e2377f262f51ee677 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 15:30:15 -0400 Subject: [PATCH 6/8] add job description field and enhance test --- .../data/protobuf/pbs/person_someone3.pb | Bin 35 -> 54 bytes .../data/protobuf/pbs/person_someone3.txt | 1 + .../data/protobuf/protos/test_protobuf3.desc | Bin 595 -> 661 bytes .../data/protobuf/protos/test_protobuf3.proto | 1 + lib/codecs/tests/protobuf.rs | 98 +++++++++++------- 5 files changed, 64 insertions(+), 36 deletions(-) diff --git a/lib/codecs/tests/data/protobuf/pbs/person_someone3.pb b/lib/codecs/tests/data/protobuf/pbs/person_someone3.pb index 80e4ef6f4dfb6694d4203b9212e567241810a41c..baca85965a9db9e87cf6cbce4ad61c2787b43bef 100644 GIT binary patch delta 24 fcmY#3o1iRgBp95ZR#Ki=l&avGm!6rInpy+^SoH_{ delta 4 LcmXq0o}df>0*C<( diff --git a/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt b/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt index 0d97636437456..e558a3e154ff0 100644 --- a/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt +++ b/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt @@ -1,4 +1,5 @@ name: "someone" +job_description: "Software Engineer" data { key: "data_phone" value: HOME diff --git a/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc b/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc index ab2f3ca6ec70d147f61b71e6d3eab293fcfbb708..3826c540cd21460ce6e6f09ce262ad0ffe46434e 100644 GIT binary patch delta 89 zcmcc2GL@B?YZB{3W_6}TEE9Etv~;-mv+|STQ&NkQi!uvJGV}8!*c2EwI6aty_<#~F X2=R?olNd#ugt!Fa(KJlvVR8omqBtAW delta 25 hcmbQrdYOfp>jKL}W_6|q%oBBjHm>Poob1Qs4ghA)2p9kW diff --git a/lib/codecs/tests/data/protobuf/protos/test_protobuf3.proto b/lib/codecs/tests/data/protobuf/protos/test_protobuf3.proto index 672a05d2fac9a..34be7a19edcc8 100644 --- a/lib/codecs/tests/data/protobuf/protos/test_protobuf3.proto +++ b/lib/codecs/tests/data/protobuf/protos/test_protobuf3.proto @@ -6,6 +6,7 @@ message Person { optional string name = 1; optional int32 id = 2; optional string email = 3; + optional string job_description = 6; // This will have JSON name "jobDescription" enum PhoneType { MOBILE = 0; diff --git a/lib/codecs/tests/protobuf.rs b/lib/codecs/tests/protobuf.rs index b7eaa45351cb4..1f56e7695c6b4 100644 --- a/lib/codecs/tests/protobuf.rs +++ b/lib/codecs/tests/protobuf.rs @@ -26,12 +26,13 @@ fn read_protobuf_bin_message(path: &Path) -> Bytes { fn build_serializer_pair( desc_file: PathBuf, message_type: String, + use_json_names: bool, ) -> (ProtobufSerializer, ProtobufDeserializer) { let serializer = ProtobufSerializerConfig { protobuf: ProtobufSerializerOptions { desc_file: desc_file.clone(), message_type: message_type.clone(), - use_json_names: false, + use_json_names, }, } .build() @@ -40,7 +41,7 @@ fn build_serializer_pair( protobuf: ProtobufDeserializerOptions { desc_file, message_type, - use_json_names: false, + use_json_names, }, } .build() @@ -54,7 +55,7 @@ fn roundtrip_coding() { read_protobuf_bin_message(&test_data_dir().join("pbs/person_someone.pb")); let desc_file = test_data_dir().join("protos/test_protobuf.desc"); let message_type: String = "test_protobuf.Person".into(); - let (mut serializer, deserializer) = build_serializer_pair(desc_file, message_type); + let (mut serializer, deserializer) = build_serializer_pair(desc_file, message_type, false); let events_original = deserializer .parse(protobuf_message, LogNamespace::Vector) @@ -78,46 +79,71 @@ fn roundtrip_coding_with_json_names() { let desc_file = test_data_dir().join("protos/test_protobuf3.desc"); let message_type: String = "test_protobuf3.Person".into(); - // Create serializer with use_json_names enabled - let mut serializer = ProtobufSerializerConfig { - protobuf: ProtobufSerializerOptions { - desc_file: desc_file.clone(), - message_type: message_type.clone(), - use_json_names: true, - }, - } - .build() - .unwrap(); - - // Create deserializer with use_json_names enabled - let deserializer = ProtobufDeserializerConfig { - protobuf: ProtobufDeserializerOptions { - desc_file, - message_type, - use_json_names: true, - }, - } - .build() - .unwrap(); + // Test with use_json_names=false (default behavior - snake_case field names) + let (mut serializer_snake_case, deserializer_snake_case) = + build_serializer_pair(desc_file.clone(), message_type.clone(), false); - // Parse the original message - let events_original = deserializer - .parse(protobuf_message, LogNamespace::Vector) + let events_snake_case = deserializer_snake_case + .parse(protobuf_message.clone(), LogNamespace::Vector) .unwrap(); - assert_eq!(1, events_original.len()); + assert_eq!(1, events_snake_case.len()); + + // Verify that protobuf field names are being used (snake_case) + let event = events_snake_case[0].as_log(); + assert!( + event.contains("job_description"), + "Event should contain 'job_description' (protobuf field name) when use_json_names is disabled" + ); + assert_eq!( + event.get("job_description").unwrap().to_string_lossy(), + "Software Engineer" + ); + assert!( + !event.contains("jobDescription"), + "Event should not contain 'jobDescription' (JSON name) when use_json_names is disabled" + ); - // Encode it back + // Test roundtrip with snake_case let mut new_message = BytesMut::new(); - serializer - .encode(events_original[0].clone(), &mut new_message) + serializer_snake_case + .encode(events_snake_case[0].clone(), &mut new_message) .unwrap(); + let events_encoded = deserializer_snake_case + .parse(new_message.into(), LogNamespace::Vector) + .unwrap(); + assert_eq!(events_snake_case, events_encoded); - // Decode the re-encoded message - let protobuf_message: Bytes = new_message.into(); - let events_encoded = deserializer + // Test with use_json_names=true (camelCase field names) + let (mut serializer_camel_case, deserializer_camel_case) = + build_serializer_pair(desc_file, message_type, true); + + let events_camel_case = deserializer_camel_case .parse(protobuf_message, LogNamespace::Vector) .unwrap(); + assert_eq!(1, events_camel_case.len()); - // Should be the same - assert_eq!(events_original, events_encoded); + // Verify that JSON names are being used (camelCase) + let event = events_camel_case[0].as_log(); + assert!( + event.contains("jobDescription"), + "Event should contain 'jobDescription' (JSON name) when use_json_names is enabled" + ); + assert_eq!( + event.get("jobDescription").unwrap().to_string_lossy(), + "Software Engineer" + ); + assert!( + !event.contains("job_description"), + "Event should not contain 'job_description' (protobuf name) when use_json_names is enabled" + ); + + // Test roundtrip with camelCase + let mut new_message = BytesMut::new(); + serializer_camel_case + .encode(events_camel_case[0].clone(), &mut new_message) + .unwrap(); + let events_encoded = deserializer_camel_case + .parse(new_message.into(), LogNamespace::Vector) + .unwrap(); + assert_eq!(events_camel_case, events_encoded); } From adf658810ed4ddaecf69286957cfe10337372527 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 15:44:58 -0400 Subject: [PATCH 7/8] clippy fixes --- src/sinks/util/encoding.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sinks/util/encoding.rs b/src/sinks/util/encoding.rs index 9cb28fbab6cb3..bb5a938ec017f 100644 --- a/src/sinks/util/encoding.rs +++ b/src/sinks/util/encoding.rs @@ -406,7 +406,7 @@ mod tests { protobuf: ProtobufSerializerOptions { desc_file: test_data_dir().join("test_proto.desc"), message_type: "test_proto.User".to_string(), - ..Default::default() + use_json_names: false, }, }; @@ -461,6 +461,7 @@ mod tests { protobuf: ProtobufSerializerOptions { desc_file: test_data_dir().join("test_proto.desc"), message_type: "test_proto.User".to_string(), + use_json_names: false, }, }; From b5fcfab3f74aff88f6e5f485c23e5f7303868a7d Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 14 Oct 2025 16:51:18 -0400 Subject: [PATCH 8/8] docs feedback --- lib/codecs/src/encoding/format/protobuf.rs | 4 ++-- website/cue/reference/components/sinks/generated/amqp.cue | 4 ++-- .../components/sinks/generated/aws_cloudwatch_logs.cue | 4 ++-- .../components/sinks/generated/aws_kinesis_firehose.cue | 4 ++-- .../components/sinks/generated/aws_kinesis_streams.cue | 4 ++-- website/cue/reference/components/sinks/generated/aws_s3.cue | 4 ++-- website/cue/reference/components/sinks/generated/aws_sns.cue | 4 ++-- website/cue/reference/components/sinks/generated/aws_sqs.cue | 4 ++-- .../cue/reference/components/sinks/generated/azure_blob.cue | 4 ++-- website/cue/reference/components/sinks/generated/console.cue | 4 ++-- website/cue/reference/components/sinks/generated/file.cue | 4 ++-- .../components/sinks/generated/gcp_chronicle_unstructured.cue | 4 ++-- .../components/sinks/generated/gcp_cloud_storage.cue | 4 ++-- .../cue/reference/components/sinks/generated/gcp_pubsub.cue | 4 ++-- website/cue/reference/components/sinks/generated/http.cue | 4 ++-- .../cue/reference/components/sinks/generated/humio_logs.cue | 4 ++-- website/cue/reference/components/sinks/generated/kafka.cue | 4 ++-- website/cue/reference/components/sinks/generated/loki.cue | 4 ++-- website/cue/reference/components/sinks/generated/mqtt.cue | 4 ++-- website/cue/reference/components/sinks/generated/nats.cue | 4 ++-- .../reference/components/sinks/generated/opentelemetry.cue | 4 ++-- .../cue/reference/components/sinks/generated/papertrail.cue | 4 ++-- website/cue/reference/components/sinks/generated/pulsar.cue | 4 ++-- website/cue/reference/components/sinks/generated/redis.cue | 4 ++-- website/cue/reference/components/sinks/generated/socket.cue | 4 ++-- .../reference/components/sinks/generated/splunk_hec_logs.cue | 4 ++-- website/cue/reference/components/sinks/generated/webhdfs.cue | 4 ++-- .../cue/reference/components/sinks/generated/websocket.cue | 4 ++-- .../reference/components/sinks/generated/websocket_server.cue | 4 ++-- 29 files changed, 58 insertions(+), 58 deletions(-) diff --git a/lib/codecs/src/encoding/format/protobuf.rs b/lib/codecs/src/encoding/format/protobuf.rs index 9c642f5b2533c..f1c6730615707 100644 --- a/lib/codecs/src/encoding/format/protobuf.rs +++ b/lib/codecs/src/encoding/format/protobuf.rs @@ -67,8 +67,8 @@ pub struct ProtobufSerializerOptions { /// Use JSON field names (camelCase) instead of protobuf field names (snake_case). /// - /// When enabled, the serializer will look for fields using their JSON names as defined - /// in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + /// When enabled, the serializer looks for fields using their JSON names as defined + /// in the `.proto` file (for example `jobDescription` instead of `job_description`). /// /// This is useful when working with data that has already been converted from JSON or /// when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/amqp.cue b/website/cue/reference/components/sinks/generated/amqp.cue index 9b9e7f090adde..66fb1312c5695 100644 --- a/website/cue/reference/components/sinks/generated/amqp.cue +++ b/website/cue/reference/components/sinks/generated/amqp.cue @@ -401,8 +401,8 @@ generated: components: sinks: amqp: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue b/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue index de9d5d9bfaa0f..12686c9b27b65 100644 --- a/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue +++ b/website/cue/reference/components/sinks/generated/aws_cloudwatch_logs.cue @@ -597,8 +597,8 @@ generated: components: sinks: aws_cloudwatch_logs: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue b/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue index 1862d368fdb72..da311f458462e 100644 --- a/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue +++ b/website/cue/reference/components/sinks/generated/aws_kinesis_firehose.cue @@ -576,8 +576,8 @@ generated: components: sinks: aws_kinesis_firehose: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue b/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue index 8b8937a7ae4cc..4a800fa6e35da 100644 --- a/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue +++ b/website/cue/reference/components/sinks/generated/aws_kinesis_streams.cue @@ -576,8 +576,8 @@ generated: components: sinks: aws_kinesis_streams: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/aws_s3.cue b/website/cue/reference/components/sinks/generated/aws_s3.cue index 4afe23c86ee2f..f17b2abf1e74f 100644 --- a/website/cue/reference/components/sinks/generated/aws_s3.cue +++ b/website/cue/reference/components/sinks/generated/aws_s3.cue @@ -685,8 +685,8 @@ generated: components: sinks: aws_s3: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/aws_sns.cue b/website/cue/reference/components/sinks/generated/aws_sns.cue index 67bb063b5c718..1d2413066b071 100644 --- a/website/cue/reference/components/sinks/generated/aws_sns.cue +++ b/website/cue/reference/components/sinks/generated/aws_sns.cue @@ -507,8 +507,8 @@ generated: components: sinks: aws_sns: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/aws_sqs.cue b/website/cue/reference/components/sinks/generated/aws_sqs.cue index 71c88a27b99fb..912e1f2c43ea6 100644 --- a/website/cue/reference/components/sinks/generated/aws_sqs.cue +++ b/website/cue/reference/components/sinks/generated/aws_sqs.cue @@ -507,8 +507,8 @@ generated: components: sinks: aws_sqs: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/azure_blob.cue b/website/cue/reference/components/sinks/generated/azure_blob.cue index 116e67e78d0c9..69bdd368f1338 100644 --- a/website/cue/reference/components/sinks/generated/azure_blob.cue +++ b/website/cue/reference/components/sinks/generated/azure_blob.cue @@ -531,8 +531,8 @@ generated: components: sinks: azure_blob: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/console.cue b/website/cue/reference/components/sinks/generated/console.cue index 1897fe19da403..16545964f6950 100644 --- a/website/cue/reference/components/sinks/generated/console.cue +++ b/website/cue/reference/components/sinks/generated/console.cue @@ -385,8 +385,8 @@ generated: components: sinks: console: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/file.cue b/website/cue/reference/components/sinks/generated/file.cue index 6094a61a439a9..3135f4b70db5f 100644 --- a/website/cue/reference/components/sinks/generated/file.cue +++ b/website/cue/reference/components/sinks/generated/file.cue @@ -405,8 +405,8 @@ generated: components: sinks: file: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue b/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue index 2ca4b9df06b2a..0a027dfa45a74 100644 --- a/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue +++ b/website/cue/reference/components/sinks/generated/gcp_chronicle_unstructured.cue @@ -473,8 +473,8 @@ generated: components: sinks: gcp_chronicle_unstructured: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue b/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue index 77a5787640792..22f565c34665d 100644 --- a/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue +++ b/website/cue/reference/components/sinks/generated/gcp_cloud_storage.cue @@ -546,8 +546,8 @@ generated: components: sinks: gcp_cloud_storage: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/gcp_pubsub.cue b/website/cue/reference/components/sinks/generated/gcp_pubsub.cue index 5c1af6e6157dd..385bf9dd13793 100644 --- a/website/cue/reference/components/sinks/generated/gcp_pubsub.cue +++ b/website/cue/reference/components/sinks/generated/gcp_pubsub.cue @@ -452,8 +452,8 @@ generated: components: sinks: gcp_pubsub: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/http.cue b/website/cue/reference/components/sinks/generated/http.cue index 23401034ceb5f..68406cb2c5037 100644 --- a/website/cue/reference/components/sinks/generated/http.cue +++ b/website/cue/reference/components/sinks/generated/http.cue @@ -628,8 +628,8 @@ generated: components: sinks: http: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/humio_logs.cue b/website/cue/reference/components/sinks/generated/humio_logs.cue index e835ee941ff64..b9e46513d8b9c 100644 --- a/website/cue/reference/components/sinks/generated/humio_logs.cue +++ b/website/cue/reference/components/sinks/generated/humio_logs.cue @@ -451,8 +451,8 @@ generated: components: sinks: humio_logs: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/kafka.cue b/website/cue/reference/components/sinks/generated/kafka.cue index 4bcabf223fe3e..9b3ef74b7dd76 100644 --- a/website/cue/reference/components/sinks/generated/kafka.cue +++ b/website/cue/reference/components/sinks/generated/kafka.cue @@ -440,8 +440,8 @@ generated: components: sinks: kafka: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/loki.cue b/website/cue/reference/components/sinks/generated/loki.cue index 56dcdbdc499fd..3a8754491faa8 100644 --- a/website/cue/reference/components/sinks/generated/loki.cue +++ b/website/cue/reference/components/sinks/generated/loki.cue @@ -630,8 +630,8 @@ generated: components: sinks: loki: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/mqtt.cue b/website/cue/reference/components/sinks/generated/mqtt.cue index c0ac4d4eab31c..980996cff164d 100644 --- a/website/cue/reference/components/sinks/generated/mqtt.cue +++ b/website/cue/reference/components/sinks/generated/mqtt.cue @@ -395,8 +395,8 @@ generated: components: sinks: mqtt: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/nats.cue b/website/cue/reference/components/sinks/generated/nats.cue index ae90f43c8495f..0979492903e9c 100644 --- a/website/cue/reference/components/sinks/generated/nats.cue +++ b/website/cue/reference/components/sinks/generated/nats.cue @@ -485,8 +485,8 @@ generated: components: sinks: nats: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/opentelemetry.cue b/website/cue/reference/components/sinks/generated/opentelemetry.cue index be8a3da018b7c..308f48f0cee6d 100644 --- a/website/cue/reference/components/sinks/generated/opentelemetry.cue +++ b/website/cue/reference/components/sinks/generated/opentelemetry.cue @@ -631,8 +631,8 @@ generated: components: sinks: opentelemetry: configuration: protocol: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/papertrail.cue b/website/cue/reference/components/sinks/generated/papertrail.cue index 6c1d34575fcd7..b69042f48b2ff 100644 --- a/website/cue/reference/components/sinks/generated/papertrail.cue +++ b/website/cue/reference/components/sinks/generated/papertrail.cue @@ -385,8 +385,8 @@ generated: components: sinks: papertrail: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/pulsar.cue b/website/cue/reference/components/sinks/generated/pulsar.cue index 9239c5acf67d1..cc2cb6c90cb3a 100644 --- a/website/cue/reference/components/sinks/generated/pulsar.cue +++ b/website/cue/reference/components/sinks/generated/pulsar.cue @@ -519,8 +519,8 @@ generated: components: sinks: pulsar: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/redis.cue b/website/cue/reference/components/sinks/generated/redis.cue index 20c876e36ac65..fdd5686420da8 100644 --- a/website/cue/reference/components/sinks/generated/redis.cue +++ b/website/cue/reference/components/sinks/generated/redis.cue @@ -444,8 +444,8 @@ generated: components: sinks: redis: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/socket.cue b/website/cue/reference/components/sinks/generated/socket.cue index e68df16632202..17d6e8cf7d4d0 100644 --- a/website/cue/reference/components/sinks/generated/socket.cue +++ b/website/cue/reference/components/sinks/generated/socket.cue @@ -397,8 +397,8 @@ generated: components: sinks: socket: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue b/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue index fb39c990129dd..ce87f34e9ff83 100644 --- a/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue +++ b/website/cue/reference/components/sinks/generated/splunk_hec_logs.cue @@ -501,8 +501,8 @@ generated: components: sinks: splunk_hec_logs: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/webhdfs.cue b/website/cue/reference/components/sinks/generated/webhdfs.cue index ffacf3fcd8948..236bd9f491f33 100644 --- a/website/cue/reference/components/sinks/generated/webhdfs.cue +++ b/website/cue/reference/components/sinks/generated/webhdfs.cue @@ -451,8 +451,8 @@ generated: components: sinks: webhdfs: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/websocket.cue b/website/cue/reference/components/sinks/generated/websocket.cue index a7275bf42a1d7..3e901d5ba0276 100644 --- a/website/cue/reference/components/sinks/generated/websocket.cue +++ b/website/cue/reference/components/sinks/generated/websocket.cue @@ -557,8 +557,8 @@ generated: components: sinks: websocket: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions. diff --git a/website/cue/reference/components/sinks/generated/websocket_server.cue b/website/cue/reference/components/sinks/generated/websocket_server.cue index 45a726f01faba..99a247497e81e 100644 --- a/website/cue/reference/components/sinks/generated/websocket_server.cue +++ b/website/cue/reference/components/sinks/generated/websocket_server.cue @@ -441,8 +441,8 @@ generated: components: sinks: websocket_server: configuration: { description: """ Use JSON field names (camelCase) instead of protobuf field names (snake_case). - When enabled, the serializer will look for fields using their JSON names as defined - in the `.proto` file (e.g., `jobDescription` instead of `job_description`). + When enabled, the serializer looks for fields using their JSON names as defined + in the `.proto` file (for example `jobDescription` instead of `job_description`). This is useful when working with data that has already been converted from JSON or when interfacing with systems that use JSON naming conventions.