-
Notifications
You must be signed in to change notification settings - Fork 49
TraceID and SpanID as [u8]; #167
Copy link
Copy link
Open
Description
I am just getting started with fastrace and I've been reading some of the opentelemetry specs as I do.
In fastrace TraceID is a u128 and SpanID is a u64, however opentelemetry specifies that is should be a
[u8; 16] and [u8; 8] respectively. This is of course not important when the data stays on the same system
but when the traces are sent to other systems (with the ids sent via HTTP headers for example) there
needs to be a wire endianness enforced (presumably Big) and this endianness needs to be accounted for
when serializing and deserializing the IDs. The fastrace library does not appear to account for endianness
when serializing and deserializing, just using format! and from_str_radix causing invalid IDs to possibly be used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels