lightstep / lightstep-tracer-javascript

Lightstep distributed tracing library for Node.js and the browser
https://lightstep.com
MIT License
77 stars 66 forks source link

Trim leading 0s when injecting in b3 propagator #238

Closed MikeGoldsmith closed 4 years ago

MikeGoldsmith commented 4 years ago

B3 TraceIDs can be either 64 or 128 bit (16 or 32 hex characters).

However, when injecting into a text carrier, if the leading 16 chars are all 0's, they should be trimmed.

eg a trace ID of '0000000000000000 0a0f6c981e2430cb' should propagate as '0a0f6c981e2430cb'

MikeGoldsmith commented 4 years ago

Done - I added release 0.29.0