Skip to content

Commit

Permalink
Clarify that 64 bit integer numbers are decimal strings in OTLP/JSON (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#1637)

Resolves open-telemetry/opentelemetry-proto#268

This behavior is already the documented behavior for JSON Protobuf,
see https://developers.google.com/protocol-buffers/docs/proto3#json:

>JSON value will be a decimal string. Either numbers or strings are accepted.
  • Loading branch information
tigrannajaryan authored Apr 27, 2021
1 parent 1722c49 commit 59a28f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions specification/protocol/otlp.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,11 @@ they are not base64-encoded like it is defined in the standard
The hex encoding is used for `trace_id` and `span_id` fields in all OTLP
Protobuf messages, e.g. the `Span`, `Link`, `LogRecord`, etc. messages.

Note that according to [Protobuf specs](
https://developers.google.com/protocol-buffers/docs/proto3#json) 64-bit integer
numbers in JSON-encoded payloads are encoded as decimal strings, and either
numbers or strings are accepted when decoding.

#### OTLP/HTTP Response

Response body MUST be the appropriate serialized Protobuf message (see below for
Expand Down

0 comments on commit 59a28f5

Please sign in to comment.