record histogram of http requests

This commit is contained in:
Charles Hall 2024-05-29 19:40:08 -07:00
parent a0b92c82e8
commit 04ecf4972e
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
2 changed files with 95 additions and 6 deletions

View file

@ -196,7 +196,8 @@ async fn run_server() -> io::Result<()> {
.max_request_size
.try_into()
.expect("failed to convert max request size"),
));
))
.layer(axum::middleware::from_fn(observability::http_metrics_layer));
let app = routes(config).layer(middlewares).into_make_service();
let handle = ServerHandle::new();