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

Set encoding rules for bytes represented in text and JSON #1252

Open
rakyll opened this issue Nov 20, 2020 · 4 comments
Open

Set encoding rules for bytes represented in text and JSON #1252

rakyll opened this issue Nov 20, 2020 · 4 comments
Labels
area:miscellaneous For issues that don't match any other area label priority:p3 Lowest priority level release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs spec:protocol Related to the specification/protocol directory

Comments

@rakyll
Copy link
Contributor

rakyll commented Nov 20, 2020

What are you trying to achieve?
When writing exporters, it's not clear how bytes should be represented in text or JSON output.

For example, trace ID (16 bytes), span ID (8 bytes) and trace flags can be represented as hex encoded strings.

@rakyll rakyll added the spec:miscellaneous For issues that don't match any other spec label label Nov 20, 2020
@Oberon00 Oberon00 added the spec:protocol Related to the specification/protocol directory label Nov 20, 2020
@andrewhsu andrewhsu added the release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs label Nov 20, 2020
@andrewhsu
Copy link
Member

andrewhsu commented Nov 20, 2020

from the issue triage mtg today, discussed this. is this just about the traceid? if so, may already be specified in the spec (@mwear may know?)

if not, can you also suggest appropriate wording change?

@andrewhsu andrewhsu added priority:p3 Lowest priority level area:miscellaneous For issues that don't match any other area label and removed spec:miscellaneous For issues that don't match any other spec label labels Nov 20, 2020
@chulkilee
Copy link

Is it for OTLP/HTTP JSON? If so, doesn't Protocol Buffer 3 JSON Mapping define the encoding?

JSON value will be the data encoded as a string using standard base64 encoding with paddings. Either standard or URL-safe base64 encoding with/without paddings are accepted.

(We may use the same encoding for standard output)

@anuraaga
Copy link
Contributor

anuraaga commented Dec 2, 2020

For OTLP, we use hex instead of the standard proto mapping

https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/otlp.md#otlphttp-request

the trace_id and span_id byte arrays are represented as case-insensitive hex-encoded strings, they are not base64-encoded like it is defined in the standard JSON Mapping.

@chulkilee
Copy link

Oh, I missed that part 🤦

So the spec says hex (or base16) for OTLP/HTTP request with JSON encoded prototobuf message..

Reference: #786 and #911

Then what's this issue for? For text format? I'm wondering there is written spec for standard output - while the matrix has "Standard output" entry..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:miscellaneous For issues that don't match any other area label priority:p3 Lowest priority level release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs spec:protocol Related to the specification/protocol directory
Projects
None yet
Development

No branches or pull requests

5 participants