lightstep-tracer-javascript
lightstep-tracer-javascript copied to clipboard
Clock skew correction should take into account wrong window.performance time on browser platform
In the nowMicros function for the browser platform implementation we try to use window.performance before falling back to Date.now()
but these sometimes disagrees with window.performance.now()
by significant amounts of time, causing incorrect traces if Date.now()
or start times and end times are set in spans that are part of the same report.
Ideally, I think we should calculate the difference between performance.now() and Date.now() and then apply that as the clock correction offset on the spans.