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
Currently, the open telemetry span is considered to be running until the tracing span is dropped and closed. This can be an issue in cases where either the span is held onto in case the operation needs more processing which was not known beforehand or when a structure holds onto the span.
More specifically, this can happen for example with JoinHandle<T> which points to a spawned instrumented task. Even though the task has finished as long as we hold the handle, the span will exist and end time will be sent only when the handle is dropped.
Proposal
Set the time on each on_exit, overwriting the value on each exit. The last value will be used when the span is closed, built, and sent.
Alternatives
The user can manage dropping the spans themself, but then they sometimes cannot use instrument() and some other useful utilities.
The text was updated successfully, but these errors were encountered:
Feature Request
Motivation
Currently, the open telemetry span is considered to be running until the tracing span is dropped and closed. This can be an issue in cases where either the span is held onto in case the operation needs more processing which was not known beforehand or when a structure holds onto the span.
More specifically, this can happen for example with
JoinHandle<T>
which points to a spawned instrumented task. Even though the task has finished as long as we hold the handle, the span will exist and end time will be sent only when the handle is dropped.Proposal
Set the time on each
on_exit
, overwriting the value on each exit. The last value will be used when the span is closed, built, and sent.Alternatives
The user can manage dropping the spans themself, but then they sometimes cannot use
instrument()
and some other useful utilities.The text was updated successfully, but these errors were encountered: