Skip to main content

Module spans

Module spans 

Source
Expand description

Events reprensenting units of code execution

Structs§

BeginAsyncDynNamedSpanEvent
BeginAsyncNamedSpanEvent
BeginAsyncSpanEvent
BeginThreadDynNamedSpanEvent
BeginThreadNamedSpanEvent
BeginThreadSpanEvent
DynSpanName
A span name built at runtime. It is copied into the block that records each event.
EndAsyncDynNamedSpanEvent
EndAsyncNamedSpanEvent
EndAsyncSpanEvent
EndThreadDynNamedSpanEvent
EndThreadNamedSpanEvent
EndThreadSpanEvent
EntryProperties
The end hook of a future whose properties were computed when it was created.
InstrumentedFuture
A wrapper that instruments a future with async span tracing
InstrumentedNamedFuture
A wrapper that instruments a future with named async span tracing
NoHook
The end hook of a future that carries no properties: its span ends plainly.
SpanContextFuture
A future wrapper that establishes a span context on every poll.
SpanLocation
SpanLocationRecord
SpanMetadata
SpanProperties
Properties a span carries until its end event. Values are copied in, so they only need to outlive the call that sets them.
SpanRecord
StaticSpanName
A &'static str name. It is a lifetime-free wrapper because a trait implemented only for &'static str makes rustc reject Send futures that await an instrumented future (“implementation is not general enough”).
TaggedEndAsyncNamedSpanEvent
TaggedEndAsyncSpanEvent
TaggedEndThreadNamedSpanEvent
The name is always a block-scoped string record, whether it was 'static or built at runtime.
TaggedEndThreadSpanEvent
ThreadDepsQueue
ThreadEventQueue

Enums§

ThreadDepsQueueAny
ThreadEventQueueAny

Traits§

InstrumentFuture
Trait for adding instrumentation to futures
SpanEndHook
Runs when an instrumented future completes, to add properties to the span’s end event from the future’s output.
SpanName
ThreadDepsQueueTypeIndex
ThreadEventQueueTypeIndex

Functions§

current_span_id
Returns the current span ID from the async call stack. Returns 0 (root) if no span is active.
spawn_with_context
Spawns a future on the tokio runtime while preserving the current span context.

Type Aliases§

ThreadBlock
ThreadStream