Struct tracing_actix_web::RootSpan [−][src]
pub struct RootSpan(_);
Expand description
The root span associated to the in-flight current request.
It can be used to populate additional properties using values computed or retrieved in the request handler - see the crate-level documentation for more details.
Extracting a RootSpan
when the TracingLogger
middleware is not registered will result in
an internal server error.
Usage
use actix_web::get;
use tracing_actix_web::RootSpan;
use uuid::Uuid;
#[get("/")]
async fn index(root_span: RootSpan) -> String {
root_span.record("route", &"/");
}
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RootSpan
impl !UnwindSafe for RootSpan
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more