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
Due to inherent inaccuracies in binary floating point arithmetic, the OT shim's implementation has slight imprecision when converting time values from the OT format to the OTel format and vice versa.
For the user it may not matter too much. In the tests, we tolerate imprecision of up to 1 microsecond using assertAlmostEqual().
This problem has been explained in detail in the docs (#244) which aren't merged at the time of writing:
Due to inherent inaccuracies in binary floating point arithmetic, the OT shim's implementation has slight imprecision when converting time values from the OT format to the OTel format and vice versa.
For the user it may not matter too much. In the tests, we tolerate imprecision of up to 1 microsecond using
assertAlmostEqual()
.This problem has been explained in detail in the docs (#244) which aren't merged at the time of writing:
https://github.com/kinvolk/opentelemetry-python/blob/bd020e9720f343a5a370cfb673df7beb4a98ac44/ext/opentelemetry-ext-opentracing-shim/src/opentelemetry/ext/opentracing_shim/__init__.py#L51-L78
I've added TODOs in the relevant places in the tests:
opentelemetry-python/ext/opentelemetry-ext-opentracing-shim/tests/test_shim.py
Lines 123 to 126 in 26d56c0
opentelemetry-python/ext/opentelemetry-ext-opentracing-shim/tests/test_shim.py
Lines 137 to 140 in 26d56c0
opentelemetry-python/ext/opentelemetry-ext-opentracing-shim/tests/test_shim.py
Lines 403 to 406 in 26d56c0
We should add a link to the relevant part in the official docs once merged.
The text was updated successfully, but these errors were encountered: