Skip to main content

Module tracing

Module tracing 

Source
Expand description

Generic HTTP request tracing.

A thin, named constructor over tower_http’s default HTTP trace layer so callers don’t have to spell out the classifier type. Products that want custom spans (e.g. including the request ID) can still reach for tower_http::trace::TraceLayer directly and layer it alongside crate::middleware::request_id.

Functions§

trace_layer
Build a tower_http request tracing layer with the library’s default HTTP classification (5xx responses and transport errors count as failures; everything else is a success span).

Type Aliases§

HttpTraceLayer
Concrete type returned by trace_layer — spelled out once here so callers don’t need to name tower_http’s classifier generics themselves.