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 diff --git a/lib/codecs/src/decoding/format/protobuf.rs b/lib/codecs/src/decoding/format/protobuf.rs index b34acd392d90c..eb00dd74bb160 100644 --- a/lib/codecs/src/decoding/format/protobuf.rs +++ b/lib/codecs/src/decoding/format/protobuf.rs @@ -81,6 +81,16 @@ 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, skip_serializing_if = "vector_core::serde::is_default")] + pub use_json_names: bool, } /// Deserializer that builds `Event`s from a byte frame containing protobuf. @@ -166,7 +176,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..f1c6730615707 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,16 @@ 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 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. + #[serde(default, skip_serializing_if = "vector_core::serde::is_default")] + 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.pb b/lib/codecs/tests/data/protobuf/pbs/person_someone3.pb index 80e4ef6f4dfb6..baca85965a9db 100644 Binary files a/lib/codecs/tests/data/protobuf/pbs/person_someone3.pb and b/lib/codecs/tests/data/protobuf/pbs/person_someone3.pb differ diff --git a/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt b/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt index 0a5086c628414..e558a3e154ff0 100644 --- a/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt +++ b/lib/codecs/tests/data/protobuf/pbs/person_someone3.txt @@ -1,2 +1,10 @@ -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" +job_description: "Software Engineer" +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 43e7acf6cf771..658b7f8d6152c 100644 Binary files a/lib/codecs/tests/data/protobuf/protos/test_protobuf.desc and b/lib/codecs/tests/data/protobuf/protos/test_protobuf.desc differ diff --git a/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc b/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc index 9fcfec71b44b8..3826c540cd214 100644 Binary files a/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc and b/lib/codecs/tests/data/protobuf/protos/test_protobuf3.desc differ 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 1d72f34ea6522..1f56e7695c6b4 100644 --- a/lib/codecs/tests/protobuf.rs +++ b/lib/codecs/tests/protobuf.rs @@ -26,11 +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, }, } .build() @@ -39,6 +41,7 @@ fn build_serializer_pair( protobuf: ProtobufDeserializerOptions { desc_file, message_type, + use_json_names, }, } .build() @@ -52,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) @@ -68,3 +71,79 @@ 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(); + + // 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); + + let events_snake_case = deserializer_snake_case + .parse(protobuf_message.clone(), LogNamespace::Vector) + .unwrap(); + 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" + ); + + // Test roundtrip with snake_case + let mut new_message = BytesMut::new(); + 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); + + // 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()); + + // 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); +} 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/src/sinks/util/encoding.rs b/src/sinks/util/encoding.rs index 2116a946d96f3..bb5a938ec017f 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(), + use_json_names: false, }, }; @@ -460,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, }, }; 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/sinks/generated/amqp.cue b/website/cue/reference/components/sinks/generated/amqp.cue index 5887fb620c615..66fb1312c5695 100644 --- a/website/cue/reference/components/sinks/generated/amqp.cue +++ b/website/cue/reference/components/sinks/generated/amqp.cue @@ -397,6 +397,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..12686c9b27b65 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,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..da311f458462e 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,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..4a800fa6e35da 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,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..f17b2abf1e74f 100644 --- a/website/cue/reference/components/sinks/generated/aws_s3.cue +++ b/website/cue/reference/components/sinks/generated/aws_s3.cue @@ -681,6 +681,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..1d2413066b071 100644 --- a/website/cue/reference/components/sinks/generated/aws_sns.cue +++ b/website/cue/reference/components/sinks/generated/aws_sns.cue @@ -503,6 +503,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..912e1f2c43ea6 100644 --- a/website/cue/reference/components/sinks/generated/aws_sqs.cue +++ b/website/cue/reference/components/sinks/generated/aws_sqs.cue @@ -503,6 +503,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..69bdd368f1338 100644 --- a/website/cue/reference/components/sinks/generated/azure_blob.cue +++ b/website/cue/reference/components/sinks/generated/azure_blob.cue @@ -527,6 +527,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/console.cue b/website/cue/reference/components/sinks/generated/console.cue index 01a8b3764f6c7..16545964f6950 100644 --- a/website/cue/reference/components/sinks/generated/console.cue +++ b/website/cue/reference/components/sinks/generated/console.cue @@ -381,6 +381,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/file.cue b/website/cue/reference/components/sinks/generated/file.cue index 472622b5a4f55..3135f4b70db5f 100644 --- a/website/cue/reference/components/sinks/generated/file.cue +++ b/website/cue/reference/components/sinks/generated/file.cue @@ -401,6 +401,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..0a027dfa45a74 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,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..22f565c34665d 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,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..385bf9dd13793 100644 --- a/website/cue/reference/components/sinks/generated/gcp_pubsub.cue +++ b/website/cue/reference/components/sinks/generated/gcp_pubsub.cue @@ -448,6 +448,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/http.cue b/website/cue/reference/components/sinks/generated/http.cue index 97d6d17178bd5..68406cb2c5037 100644 --- a/website/cue/reference/components/sinks/generated/http.cue +++ b/website/cue/reference/components/sinks/generated/http.cue @@ -624,6 +624,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..b9e46513d8b9c 100644 --- a/website/cue/reference/components/sinks/generated/humio_logs.cue +++ b/website/cue/reference/components/sinks/generated/humio_logs.cue @@ -447,6 +447,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/kafka.cue b/website/cue/reference/components/sinks/generated/kafka.cue index a90c3e1bf0857..9b3ef74b7dd76 100644 --- a/website/cue/reference/components/sinks/generated/kafka.cue +++ b/website/cue/reference/components/sinks/generated/kafka.cue @@ -436,6 +436,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/loki.cue b/website/cue/reference/components/sinks/generated/loki.cue index b83cd54280f7f..3a8754491faa8 100644 --- a/website/cue/reference/components/sinks/generated/loki.cue +++ b/website/cue/reference/components/sinks/generated/loki.cue @@ -626,6 +626,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/mqtt.cue b/website/cue/reference/components/sinks/generated/mqtt.cue index c2d192d35ac3e..980996cff164d 100644 --- a/website/cue/reference/components/sinks/generated/mqtt.cue +++ b/website/cue/reference/components/sinks/generated/mqtt.cue @@ -391,6 +391,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/nats.cue b/website/cue/reference/components/sinks/generated/nats.cue index 84cba5611b2af..0979492903e9c 100644 --- a/website/cue/reference/components/sinks/generated/nats.cue +++ b/website/cue/reference/components/sinks/generated/nats.cue @@ -481,6 +481,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/opentelemetry.cue b/website/cue/reference/components/sinks/generated/opentelemetry.cue index e0b4e672fef2e..308f48f0cee6d 100644 --- a/website/cue/reference/components/sinks/generated/opentelemetry.cue +++ b/website/cue/reference/components/sinks/generated/opentelemetry.cue @@ -627,6 +627,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/papertrail.cue b/website/cue/reference/components/sinks/generated/papertrail.cue index 8704ca7a46d57..b69042f48b2ff 100644 --- a/website/cue/reference/components/sinks/generated/papertrail.cue +++ b/website/cue/reference/components/sinks/generated/papertrail.cue @@ -381,6 +381,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/pulsar.cue b/website/cue/reference/components/sinks/generated/pulsar.cue index c5545a0f17082..cc2cb6c90cb3a 100644 --- a/website/cue/reference/components/sinks/generated/pulsar.cue +++ b/website/cue/reference/components/sinks/generated/pulsar.cue @@ -515,6 +515,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/redis.cue b/website/cue/reference/components/sinks/generated/redis.cue index 2f5ac1cc0890b..fdd5686420da8 100644 --- a/website/cue/reference/components/sinks/generated/redis.cue +++ b/website/cue/reference/components/sinks/generated/redis.cue @@ -440,6 +440,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/socket.cue b/website/cue/reference/components/sinks/generated/socket.cue index 17531379e6155..17d6e8cf7d4d0 100644 --- a/website/cue/reference/components/sinks/generated/socket.cue +++ b/website/cue/reference/components/sinks/generated/socket.cue @@ -393,6 +393,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..ce87f34e9ff83 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,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/webhdfs.cue b/website/cue/reference/components/sinks/generated/webhdfs.cue index 3a6b5703f5c7f..236bd9f491f33 100644 --- a/website/cue/reference/components/sinks/generated/webhdfs.cue +++ b/website/cue/reference/components/sinks/generated/webhdfs.cue @@ -447,6 +447,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { diff --git a/website/cue/reference/components/sinks/generated/websocket.cue b/website/cue/reference/components/sinks/generated/websocket.cue index a6f86e05d4ff2..3e901d5ba0276 100644 --- a/website/cue/reference/components/sinks/generated/websocket.cue +++ b/website/cue/reference/components/sinks/generated/websocket.cue @@ -553,6 +553,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } 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..99a247497e81e 100644 --- a/website/cue/reference/components/sinks/generated/websocket_server.cue +++ b/website/cue/reference/components/sinks/generated/websocket_server.cue @@ -437,6 +437,19 @@ 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 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. + """ + required: false + type: bool: default: false + } } } timestamp_format: { @@ -718,6 +731,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/amqp.cue b/website/cue/reference/components/sources/generated/amqp.cue index f58cf369183f9..f6fff4c572fff 100644 --- a/website/cue/reference/components/sources/generated/amqp.cue +++ b/website/cue/reference/components/sources/generated/amqp.cue @@ -251,6 +251,19 @@ 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 + } } } 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..bcd2b5dfbc295 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,19 @@ 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 + } } } 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..96efca2fbdc3a 100644 --- a/website/cue/reference/components/sources/generated/aws_s3.cue +++ b/website/cue/reference/components/sources/generated/aws_s3.cue @@ -369,6 +369,19 @@ 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 + } } } 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..b077e2a842476 100644 --- a/website/cue/reference/components/sources/generated/aws_sqs.cue +++ b/website/cue/reference/components/sources/generated/aws_sqs.cue @@ -364,6 +364,19 @@ 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 + } } } 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..7c54aed47adf8 100644 --- a/website/cue/reference/components/sources/generated/datadog_agent.cue +++ b/website/cue/reference/components/sources/generated/datadog_agent.cue @@ -236,6 +236,19 @@ 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 + } } } 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..3bb3c6dcd1375 100644 --- a/website/cue/reference/components/sources/generated/demo_logs.cue +++ b/website/cue/reference/components/sources/generated/demo_logs.cue @@ -215,6 +215,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/exec.cue b/website/cue/reference/components/sources/generated/exec.cue index 6cd6464747210..cea3a3594d12c 100644 --- a/website/cue/reference/components/sources/generated/exec.cue +++ b/website/cue/reference/components/sources/generated/exec.cue @@ -216,6 +216,19 @@ 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 + } } } 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..0dc15154b51fd 100644 --- a/website/cue/reference/components/sources/generated/file_descriptor.cue +++ b/website/cue/reference/components/sources/generated/file_descriptor.cue @@ -206,6 +206,19 @@ 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 + } } } 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..27ba5875205e0 100644 --- a/website/cue/reference/components/sources/generated/gcp_pubsub.cue +++ b/website/cue/reference/components/sources/generated/gcp_pubsub.cue @@ -282,6 +282,19 @@ 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 + } } } 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..bee8afc69c1d4 100644 --- a/website/cue/reference/components/sources/generated/heroku_logs.cue +++ b/website/cue/reference/components/sources/generated/heroku_logs.cue @@ -279,6 +279,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/http.cue b/website/cue/reference/components/sources/generated/http.cue index e27794f8dcc91..b56fed721d495 100644 --- a/website/cue/reference/components/sources/generated/http.cue +++ b/website/cue/reference/components/sources/generated/http.cue @@ -280,6 +280,19 @@ 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 + } } } 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..972f4365ad90e 100644 --- a/website/cue/reference/components/sources/generated/http_client.cue +++ b/website/cue/reference/components/sources/generated/http_client.cue @@ -378,6 +378,19 @@ 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 + } } } 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..a0bfcc5ac1ab7 100644 --- a/website/cue/reference/components/sources/generated/http_server.cue +++ b/website/cue/reference/components/sources/generated/http_server.cue @@ -280,6 +280,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/kafka.cue b/website/cue/reference/components/sources/generated/kafka.cue index df12717871580..54983a73fee94 100644 --- a/website/cue/reference/components/sources/generated/kafka.cue +++ b/website/cue/reference/components/sources/generated/kafka.cue @@ -260,6 +260,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/mqtt.cue b/website/cue/reference/components/sources/generated/mqtt.cue index 65b2e2042593a..ca75a35c72198 100644 --- a/website/cue/reference/components/sources/generated/mqtt.cue +++ b/website/cue/reference/components/sources/generated/mqtt.cue @@ -211,6 +211,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/nats.cue b/website/cue/reference/components/sources/generated/nats.cue index ed5358b8fa366..21438b4bf269d 100644 --- a/website/cue/reference/components/sources/generated/nats.cue +++ b/website/cue/reference/components/sources/generated/nats.cue @@ -303,6 +303,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/pulsar.cue b/website/cue/reference/components/sources/generated/pulsar.cue index d9d573de44744..f607cb5d971df 100644 --- a/website/cue/reference/components/sources/generated/pulsar.cue +++ b/website/cue/reference/components/sources/generated/pulsar.cue @@ -309,6 +309,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/redis.cue b/website/cue/reference/components/sources/generated/redis.cue index 00b06d665c21f..17249ecfb1cf3 100644 --- a/website/cue/reference/components/sources/generated/redis.cue +++ b/website/cue/reference/components/sources/generated/redis.cue @@ -221,6 +221,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/socket.cue b/website/cue/reference/components/sources/generated/socket.cue index 1dfca4b2c4769..fbd20dfefb4bc 100644 --- a/website/cue/reference/components/sources/generated/socket.cue +++ b/website/cue/reference/components/sources/generated/socket.cue @@ -223,6 +223,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/stdin.cue b/website/cue/reference/components/sources/generated/stdin.cue index 954d24206ff34..28bb7148b9cc5 100644 --- a/website/cue/reference/components/sources/generated/stdin.cue +++ b/website/cue/reference/components/sources/generated/stdin.cue @@ -206,6 +206,19 @@ 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 + } } } syslog: { diff --git a/website/cue/reference/components/sources/generated/websocket.cue b/website/cue/reference/components/sources/generated/websocket.cue index b502a1a202814..afd4b11c06ee7 100644 --- a/website/cue/reference/components/sources/generated/websocket.cue +++ b/website/cue/reference/components/sources/generated/websocket.cue @@ -386,6 +386,19 @@ 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 + } } } syslog: { 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: