pub async fn track_http_metrics(req: Request, next: Next) -> ResponseExpand description
Axum middleware recording http.server.request.duration for every request.
Wire it after your routes so [MatchedPath] is populated:
let app = router.layer(axum::middleware::from_fn(monocle_agent::track_http_metrics));