Closed vinay2897 closed 1 year ago
It looks like the trace_id
field is of bytes type. Is that correct? bytes field are in hex string format in textproto.
It is indeed a bytes
field: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto#L81-L89
Thanks @cybrcodr @puellanivis for pointing me, I had to use the hex.EncodeToString()
to get the hex id from bytes
I am trying to unmarshal opentelemetry data like so:
But the output is not completely decoded. Some of the output looks like this:
Not sure why traceId looks like this:
spans:{trace_id:"\xb5\x81\x91\x8b\x02\x9a/\xf1\x08\x06\xaf~\xea\x9fQ\xc0"
Any help would be appreciated