From 7ba1727a9fd6c1dee9301bc2a54bf9670e66f272 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Sun, 19 Feb 2023 16:35:07 +0100 Subject: [PATCH] fix(web): don't log new metric for every query param --- src/web/web.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/web.v b/src/web/web.v index 5c612f3..ea8559c 100644 --- a/src/web/web.v +++ b/src/web/web.v @@ -331,10 +331,10 @@ fn handle_conn[T](mut conn net.TcpConn, mut app T, routes map[string]Route) { app.logger.flush() } - // Record how long request took to process + path := urllib.parse(app.req.url) or { urllib.URL{} }.path labels := [ ['method', app.req.method.str()]!, - ['path', app.req.url]!, + ['path', path]!, // Not all methods properly set this value yet I think ['status', app.status.int().str()]!, ]