[−][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:
- 
Instrumentallows atracingspan to be attached to a future, sink, stream, or executor.
- 
WithSubscriberallows atracingSubscriberto 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 thetokiocrate, includingInstrumentandWithSubscriberimplementations fortokio::executor::Executor,tokio::runtime::Runtime, andtokio::runtime::current_thread. Enabled by default.
- 
tokio-executor: Enables compatibility with thetokio-executorcrate, includingInstrumentandWithSubscriberimplementations for types implementingtokio_executor::Executor. This is intended primarily for use in crates which depend ontokio-executorrather thantokio; in general thetokiofeature should be used instead.
- 
std-future: Enables compatibility withstd::future::Future.
- 
futures-01: Enables compatibility with version 0.1.x of thefuturescrate.
- 
futures-03: Enables compatibility with version 0.3.x of thefuturescrate'sSpawnandLocalSpawntraits.
- 
tokio-alpha: Enables compatibility withtokio0.2's alpha releases, including thetokio0.2ExecutorandTypedExecutortraits.
- 
std: Depend on the Rust standard library.no_stdusers may disable this feature withdefault-features = false:[dependencies] tracing-futures = { version = "0.2.3", default-features = false }
The tokio, std-future and std 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  |