Registry / observability / tracing-futures

tracing-futures

JSON →
library0.2.5rscratesunverified

Utilities for instrumenting futures with tracing.

# Cargo.toml [dependencies] tracing-futures = "0.2.5"
INSTALL
IMPORT
SIG · TRACING-FUTURES
T
tracing-futures
observabilityrustv0.2.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Instrument
use tracing_futures::Instrument;

Instruments an async function with a tracing span.

use tracing_futures::Instrument; use tracing::info_span; async fn my_async_fn() { // async work } fn main() { let span = info_span!("my_span"); let _fut = my_async_fn().instrument(span); println!("Future instrumented."); }
Debug
Known issues
gotchaRequires an async runtime to execute the instrumented future.
fix
Use with tokio or async-std runtime.
affects: >=0.2.0
Upgrade
Version history
0.2.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
34
OpenAI (training)
1
Resources
tracing-futures — cargo add tracing-futures · libregistry