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
The span's end time is the wall time at which the operation finished.
Expected Result
I would expect to understand how my time values ought to be represented by reading the API documentation.
Actual Result
The relevant units are not mentioned in the documentation and I must find out about them by other means (reading other parts of the documentation; searching on Stack Overflow; etc.)
Additional context
I have considered the possibility that these units are left intentionally unspecified in order that subclasses of Tracer and Span might be free to use their own representation of time. However, in this case I don't understand the motivation of requiring that this type must be int.
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered:
Describe your environment
(not relevant)
What happened?
It is noted in the OpenTracing shim documentation that OTel internally uses an
int
of nanoseconds since epoch to represent time values:opentelemetry-python/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/__init__.py
Lines 53 to 59 in 0c9c624
However, the units are not described when working with time values in the API.
Steps to Reproduce
I will list the examples that I know of:
opentelemetry.trace.Tracer.start_span
andopentelemetry.trace.Tracer.start_as_current_span
:opentelemetry-python/opentelemetry-api/src/opentelemetry/trace/__init__.py
Line 327 in 0c9c624
opentelemetry-python/opentelemetry-api/src/opentelemetry/trace/__init__.py
Line 400 in 0c9c624
opentelemetry.trace.span.Span.end
: (this also fails to document theend_time
argument)opentelemetry-python/opentelemetry-api/src/opentelemetry/trace/span.py
Lines 62 to 64 in 0c9c624
Expected Result
I would expect to understand how my time values ought to be represented by reading the API documentation.
Actual Result
The relevant units are not mentioned in the documentation and I must find out about them by other means (reading other parts of the documentation; searching on Stack Overflow; etc.)
Additional context
I have considered the possibility that these units are left intentionally unspecified in order that subclasses of
Tracer
andSpan
might be free to use their own representation of time. However, in this case I don't understand the motivation of requiring that this type must beint
.Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: