diff --git a/controller/src/main.rs b/controller/src/main.rs index 29bdeab..b9e7226 100644 --- a/controller/src/main.rs +++ b/controller/src/main.rs @@ -43,13 +43,24 @@ struct VersionInfo { method = GET, path = "/version", }] -#[tracing::instrument()] +#[tracing::instrument( + skip(rqctx), + fields( + http.method=rqctx.request.method().as_str(), + http.path=rqctx.request.uri().path(), + http.remote_ip=rqctx.request.remote_addr().ip().to_string(), + request_id = rqctx.request_id, + ), + err(Debug), +)] async fn api_version( rqctx: RequestContext>, ) -> Result, HttpError> { let ver = VersionInfo { name: String::from("patagia-controller"), }; + + tracing::info!("Someone made a request to /version"); Ok(HttpResponseOk(ver)) }