status code just as integer, drop canonical reason string

This commit is contained in:
Alex 2022-12-11 21:21:40 +01:00
parent 6fda16048a
commit 3c5aa3680e
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE

View file

@ -193,14 +193,7 @@ async fn handle_request(
) )
.await; .await;
tags.push(KeyValue::new( tags.push(KeyValue::new("status_code", resp.status().as_u16() as i64));
"status_code",
format!(
"{} {}",
resp.status().as_u16(),
resp.status().canonical_reason().unwrap_or_default()
),
));
metrics.requests_served.add(1, &tags); metrics.requests_served.add(1, &tags);
Ok(resp) Ok(resp)