When using warp with tracing enabled, I find the tracing output to be noisy. This is because a set of tracing events is emitted by every route, i.e., filter, that is attempted on each request.
So following the tracing example from the warp repo, if I have the following routes:
let routes = hello
.or(goodbye)
.with(warp::trace::request());
Every time a request to the goodbye
route is received, two sets of tracing events will be emitted: one for the hello route, which results in a 404 rejection, and one for the goodbye route, which should reply.
Does anyone have advice on how to set up your routes to eliminate all the traces emitted for the 404 rejections, and only emit traces for the routes which reply?
Filter
type and implement a customenabled
method: docs.rs/tracing-subscriber/0.3.18/tracing_subscriber/layer/… – Dercy