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

Fix missing clock offsets over proto transport #222

Closed iredelmeier closed 4 years ago

iredelmeier commented 4 years ago

It seems that we must stringify our ints before setting them in order for them to actually get sent 😬 Without this, offsets won't get applied to spans sent via proto.

To see this in action:

  1. Emit spans over protobuf using an earlier version of the JS tracer
  2. Open the trace in LightStep
  3. Using the network tools, inspect the response body containing the trace
  4. Observe that the JS spans all have timestamp_offset == 0
  5. Repeat steps 1-3 using the fixed tracer
  6. Observe that after the fix, timestamp_offset is no longer always 0