[−][src]Crate tracing_futures
Futures compatibility for tracing
.
Overview
tracing
is a framework for instrumenting Rust programs to collect
structured, event-based diagnostic information. This crate provides utilities
for using tracing
to instrument asynchronous code written using futures and
async/await.
The crate provides the following traits:
-
Instrument
allows atracing
span to be attached to a future, sink, stream, or executor. -
WithSubscriber
allows atracing
Subscriber
to be attached to a future, sink, stream, or executor.
Feature flags
This crate provides a number of feature flags that enable compatibility features with other crates in the asynchronous ecosystem:
tokio
: Enables compatibility with thetokio
crate, includingInstrument
andWithSubscriber
implementations fortokio::executor::Executor
,tokio::runtime::Runtime
, andtokio::runtime::current_thread
. Enabled by default.tokio-executor
: Enables compatibility with thetokio-executor
crate, includingInstrument
andWithSubscriber
implementations for types implementingtokio_executor::Executor
. This is intended primarily for use in crates which depend ontokio-executor
rather thantokio
; in general thetokio
feature should be used instead.std-future
: Enables compatibility withstd::future::Future
.futures-01
: Enables compatibility with version 0.1.x of thefutures
crate.futures-preview
: Enables compatibility with thefutures-preview
crate'sSpawn
andLocalSpawn
traits.tokio-alpha
: Enables compatibility withtokio
0.2's alpha releases, including thetokio
0.2Executor
andTypedExecutor
traits.
The tokio
and futures-01
features are enabled by default.
Modules
executor | Implementations for |
Structs
Instrumented | A future, stream, sink, or executor that has been instrumented with a |
WithDispatch | A future, stream, sink, or executor that has been instrumented with a
|
Traits
Instrument | Extension trait allowing futures, streams, sinks, and executors to be
instrumented with a |
WithSubscriber | Extension trait allowing futures, streams, and skins to be instrumented with
a |