From 96e667f9bc79d666bcd75ea5806e5e74ba6bb391 Mon Sep 17 00:00:00 2001 From: fenos Date: Tue, 25 Jun 2024 09:36:54 +0200 Subject: [PATCH] fix: add metrics route when necessary --- src/admin-app.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/admin-app.ts b/src/admin-app.ts index 6d097dc9..722c4cc6 100644 --- a/src/admin-app.ts +++ b/src/admin-app.ts @@ -35,6 +35,8 @@ const build = (opts: FastifyServerOptions = {}, appInstance?: FastifyInstance): return reply.type(merged.contentType).send(data) }) + } else { + app.register(plugins.metrics({ enabledEndpoint: true })) } app.get('/status', async (_, response) => response.status(200).send())