From 8e28477505a7e6895eea8fdcf9aee89f9498c505 Mon Sep 17 00:00:00 2001 From: Tigran Najaryan Date: Tue, 9 May 2023 12:19:24 -0400 Subject: [PATCH] Use correct lowerCameCase for JSON field references The rule is: >The keys of JSON objects are field names converted to lowerCamelCase. The rule was introduced here: https://github.com/open-telemetry/opentelemetry-proto/commit/5a5e750bf984ad6088e8238397003c0d3693ec25 --- specification/otlp.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/otlp.md b/specification/otlp.md index 27f433a39..dabf4c53c 100644 --- a/specification/otlp.md +++ b/specification/otlp.md @@ -385,14 +385,14 @@ JSON Protobuf encoded payloads use proto3 standard defined [JSON Mapping](https://developers.google.com/protocol-buffers/docs/proto3#json) for mapping between Protobuf and JSON, with the following deviations from that mapping: -- The `trace_id` and `span_id` byte arrays are represented as +- The `traceId` and `spanId` byte arrays are represented as [case-insensitive hex-encoded strings](https://tools.ietf.org/html/rfc4648#section-8); they are not base64-encoded as is defined in the standard [Protobuf JSON Mapping](https://developers.google.com/protocol-buffers/docs/proto3#json). - Hex encoding is used for `trace_id` and `span_id` fields in all OTLP + Hex encoding is used for `traceId` and `spanId` fields in all OTLP Protobuf messages, e.g., the `Span`, `Link`, `LogRecord`, etc. messages. - For example, the `trace_id` field in a Span can be represented like this: - { "trace_id": "5B8EFFF798038103D269B633813FC60C", ... } + For example, the `traceId` field in a Span can be represented like this: + { "traceId": "5B8EFFF798038103D269B633813FC60C", ... } - Values of enum fields MUST be encoded as integer values. Unlike the standard [Protobuf JSON Mapping](https://developers.google.com/protocol-buffers/docs/proto3#json),