fix(span): make child span clock relative to root span#628
Conversation
|
@mayurkale22 @draffensperger I don't really like the idea of making clock/span properties public (9192b10) just for testing. Do you have a recommendation on how to test it without changing these types? Is it usual in TS adding public methods which are there just for testing? Like |
9192b10 to
665d555
Compare
665d555 to
3dad28c
Compare
|
I fixed CI |
draffensperger
left a comment
There was a problem hiding this comment.
This sort of thing is why I'm hoping we can standardize on performance.now() for all time measurments in OpenTelemetry JS!
|
Thanks! Can I ask a release with this fix? |
Sure, I can do that. By any chance, do you know fix for : https://github.com/census-instrumentation/opencensus-node/network/alerts? I wanted to include fix in next release. |
|
hmm, this link says 404 for me. |
|
Hmm, np. I will take care of it later. |
new Date()is vulnerable to clock drifts. This PR changes child span clocks to start relative to root span by usingprocess.hrtime. Otherwise in-process spans can have an invalid casualty.