Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that unknown fields must be ignored when receiving OTLP/JSON #2816

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ release.

- Add user agent to OTLP exporter specification
([#2684](https://github.com/open-telemetry/opentelemetry-specification/pull/2684))
- Clarify that unknown fields must be ignored when receiving OTLP/JSON
([#2816](https://github.com/open-telemetry/opentelemetry-specification/pull/2816))

### SDK Configuration

Expand Down
5 changes: 5 additions & 0 deletions specification/protocol/otlp.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,11 @@ for mapping between Protobuf and JSON, with the following deviations from that m
represented like this:
{ "kind": 2, ... }

- OTLP/JSON receivers MUST ignore message fields with unknown names and MUST unmarshal the
message as if the unknown field was not present in the payload.
This aligns with the behavior of the Binary Protobuf unmarshaler and ensures that adding
new fields to OTLP messages does not break existing receivers.

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
Expand Down