Closed alaendle closed 3 years ago
The spec seems to allow 16 lower-hex character TraceId's: https://github.com/openzipkin/b3-propagation#traceid-2
However the parser checks explicit for a length of 16 bytes (32 hex character): https://github.com/mtth/tracing/blob/82bdea2b1f96b7a16fb7334c0f35c74d2f188c56/src/Control/Monad/Trace/Internal.hs#L45
The workaround/solution is simple - just add 16 times '0' if the TraceId string is shorter than expected; however this is something that the library could handle.
Thanks for bring this up. I'd be happy to merge a PR allowing this.
The spec seems to allow 16 lower-hex character TraceId's: https://github.com/openzipkin/b3-propagation#traceid-2
However the parser checks explicit for a length of 16 bytes (32 hex character): https://github.com/mtth/tracing/blob/82bdea2b1f96b7a16fb7334c0f35c74d2f188c56/src/Control/Monad/Trace/Internal.hs#L45
The workaround/solution is simple - just add 16 times '0' if the TraceId string is shorter than expected; however this is something that the library could handle.