You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this while trying out ExponentialHistograms with an HTTP server. I noticed this weird striping in the histograms where any bucket not containing an integer will always have zero count:
because the http instrumentation uses hrTimeToMilliseconds().
OpenTelemetry Setup Code
No response
package.json
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
What happened?
These two util functions are using
Math.round()
to round to the nearest integer, which causes a huge loss of precision from hrTime:opentelemetry-js/packages/opentelemetry-core/src/common/time.ts
Lines 131 to 133 in 013695d
opentelemetry-js/packages/opentelemetry-core/src/common/time.ts
Lines 139 to 141 in 013695d
They could instead convert to the correct unit without rounding to an integer.
Steps to Reproduce
Expected Result
Print duration as a floating point milliseconds
Actual Result
Everything after the decimal is thrown away
Additional Details
I noticed this while trying out ExponentialHistograms with an HTTP server. I noticed this weird striping in the histograms where any bucket not containing an integer will always have zero count:
because the http instrumentation uses
hrTimeToMilliseconds()
.OpenTelemetry Setup Code
No response
package.json
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: