pub type ClassifyFn = Arc<dyn Fn(&Request<Full<Bytes>>) -> Cow<'static, str> + Send + Sync>;Expand description
Classifies a request into a low-cardinality route label (the http.route
attribute). Set once when the client is built; invoked on every request.
This is the Rust analogue of go-appkit’s ClassifyRequest callback. It must
return a bounded set of values (e.g. route templates like
GET /users/{id}), never a raw path containing identifiers, otherwise the
metric cardinality is unbounded.
Aliased Type§
pub struct ClassifyFn { /* private fields */ }