From e48b2b079064fe82378df67698d8d4d8dba7f601 Mon Sep 17 00:00:00 2001 From: Aristides Staffieri Date: Wed, 24 Jan 2024 15:53:42 -0700 Subject: [PATCH] fixes dropped metrics data --- src/route/metrics.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/route/metrics.ts b/src/route/metrics.ts index 581bfe9..f585fc0 100644 --- a/src/route/metrics.ts +++ b/src/route/metrics.ts @@ -27,7 +27,8 @@ export async function initMetricsServer( url: "/metrics", handler: async (_request, reply) => { reply.header("Content-Type", register.contentType); - register.metrics().then((data) => reply.code(200).send(data)); + const data = await register.metrics(); + reply.code(200).send(data); }, }); next();