-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use high-resolution host language timer #641
Conversation
✔️ All good! |
2c2add3
to
ff8d045
Compare
In order to set times from the host language, instead of relying on the agent's internal timing, this patch adds a hrTime (high-resolution time) function based on the one shipped by OpenTelemetry, and functioning through Node's built-in perf_hooks module.
Use the newly added hrTime function to set the time when starting and completing spans, if no custom time has been passed.
Adding the new timer is marked as a patch release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this change, span.closeSpan
(from the extension) is no longer used anywhere. Should it be removed?
packages/nodejs/.changesets/use-high-resolution-host-language-timer.md
Outdated
Show resolved
Hide resolved
It would help to avoid confusion in the future about which function to use if we remove it. |
…timer.md Co-authored-by: Tom de Bruijn <[email protected]>
Co-authored-by: Tom de Bruijn <[email protected]>
Co-authored-by: Tom de Bruijn <[email protected]>
Co-authored-by: Tom de Bruijn <[email protected]>
Since all spans are closed with explicit timestamps (using span.closeSpanWithTimestamp), span.closeSpan is no longer used, and can be removed from the extension.
Took your suggestions, and removed the |
This comment has been minimized.
This comment has been minimized.
7 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
While performing the daily checks some issues were found with this Pull Request. |
Instead of falling back to the agent’s internal timer, use a high-resolution host language timer to match timings in OpenTelemetry.