tracing: record HTTP request method

This commit is contained in:
Lambda 2024-05-23 19:14:46 +00:00 committed by Charles Hall
parent 148df18989
commit 3365608101
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF

View file

@ -168,7 +168,7 @@ async fn run_server() -> io::Result<()> {
request.uri().path() request.uri().path()
}; };
tracing::info_span!("http_request", %path) tracing::info_span!("http_request", %path, method = %request.method())
}, },
)) ))
.layer(axum::middleware::from_fn(unrecognized_method)) .layer(axum::middleware::from_fn(unrecognized_method))