Module future
Expand description
Future instrumentation utilities for tracing async operations.
This module provides utilities for instrumenting Rust futures with telemetry spans. When a future is instrumented, the associated span is automatically entered every time the future is polled.
§Examples
use veecle_telemetry::future::FutureExt;
use veecle_telemetry::span;
async fn example() {
let span = span!("async_operation", user_id = 123);
some_async_work().with_span(span).await;
}
async fn some_async_work() {
// This work will be traced under the "async_operation" span
}
Structs§
- With
Span - A future that has been instrumented with a telemetry span.
Traits§
- Future
Ext - Extension trait for instrumenting futures with telemetry spans.