From 3c5aa3680eab1989361026b96e4968b4cd92dcb5 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 11 Dec 2022 21:21:40 +0100 Subject: [PATCH] status code just as integer, drop canonical reason string --- src/https.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/https.rs b/src/https.rs index 125e429..3718bfd 100644 --- a/src/https.rs +++ b/src/https.rs @@ -193,14 +193,7 @@ async fn handle_request( ) .await; - tags.push(KeyValue::new( - "status_code", - format!( - "{} {}", - resp.status().as_u16(), - resp.status().canonical_reason().unwrap_or_default() - ), - )); + tags.push(KeyValue::new("status_code", resp.status().as_u16() as i64)); metrics.requests_served.add(1, &tags); Ok(resp)