Function vector::http::build_http_trace_layer
source ยท pub fn build_http_trace_layer<T, U>(
span: Span,
) -> TraceLayer<SharedClassifier<ServerErrorsAsFailures>, impl Fn(&Request<T>) -> Span + Clone, impl Fn(&Request<T>, &Span) + Clone, impl Fn(&Response<U>, Duration, &Span) + Clone, (), (), ()>
Expand description
Builds a [TraceLayer] configured for a HTTP server.
This layer emits HTTP specific telemetry for requests received, responses sent, and handler duration.