pub struct OpenSpan<T> where
T: Attachment, { /* fields omitted */ }
An open span.
This is a guard object - the span will be finished and reported when it
falls out of scope.
Spans can either be "attached" to or "detached" from their tracer. An attached span manages its
tracer's current span - it acts like a CurrentGuard
. A detached span does not but is Send
unlike an attached span. Spans are attached by default, but can be detached or reattached via
the detach
and attach
methods.
Detached spans are intended for use when you need to manually maintain the current trace
context. For example, when working with nonblocking futures a single OS thread is managing many
separate tasks. The futures-zipkin
crate provides a wrapper type which ensures a context is
registered as the current whenever a task is running. If some computation starts executing on
one thread and finishes executing on another, you can detach the span, send it to the other
thread, and then reattach it to properly model that behavior.
Returns the context associated with this span.
Sets the name of this span.
A builder-style version of name
.
Sets the kind of this span.
A builder-style version of kind
.
Sets the remote endpoint of this span.
A builder-style version of remote_endpoint
.
Attaches an annotation to this span.
A builder-style version of annotate
.
Attaches a tag to this span.
A builder-style version of tag
.
Detaches this span's context from the tracer.
Re-attaches this span's context to the tracer.
Executes the destructor for this type. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
impl<T> UnsafeAny for T where T: Any, | |