Skip to content

TraceID and SpanID as [u8]; #167

@jasl8r

Description

@jasl8r

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions