[−][src]Trait opentelemetry::trace::FutureExt
This is supported on crate feature
trace
only.Extension trait allowing futures, streams, and sinks to be traced with a span.
Provided methods
pub fn with_context(self, otel_cx: OpenTelemetryContext) -> WithContext<Self>
[src]
Attaches the provided Context
to this type, returning a WithContext
wrapper.
When the wrapped type is a future, stream, or sink, the attached context will be set as current while it is being polled.
pub fn with_current_context(self) -> WithContext<Self>
[src]
Attaches the current Context
to this type, returning a WithContext
wrapper.
When the wrapped type is a future, stream, or sink, the attached context will be set as the default while it is being polled.