From 76237a9e1e22f93a83ef93b26c9281154ab22071 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Mon, 19 Aug 2024 21:53:39 +0200 Subject: [PATCH] fix: :fire: Remove Prometheus integration as it is causing issues --- app.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app.ts b/app.ts index f3e560ee..a2e332da 100644 --- a/app.ts +++ b/app.ts @@ -1,11 +1,10 @@ -import { response } from "@/response"; import { sentry } from "@/sentry"; import { Hono } from "@hono/hono"; import { cors } from "@hono/hono/cors"; import { prettyJSON } from "@hono/hono/pretty-json"; import { secureHeaders } from "@hono/hono/secure-headers"; -import { prometheus } from "@hono/prometheus"; -import { getLogger } from "@logtape/logtape"; +/* import { prometheus } from "@hono/prometheus"; + */ import { getLogger } from "@logtape/logtape"; import { config } from "~/packages/config-manager/index"; import { agentBans } from "./middlewares/agent-bans"; import { bait } from "./middlewares/bait"; @@ -23,7 +22,7 @@ export const appFactory = async () => { strict: false, }); - const { printMetrics, registerMetrics } = prometheus({ + /* const { printMetrics, registerMetrics } = prometheus({ collectDefaultMetrics: true, metricOptions: { requestsTotal: { @@ -33,7 +32,7 @@ export const appFactory = async () => { }, }, }, - }); + }); */ app.use(ipBans); app.use(agentBans); @@ -82,8 +81,8 @@ export const appFactory = async () => { credentials: true, }), ); - app.use("*", registerMetrics); - app.get("/metrics", printMetrics); + /* app.use("*", registerMetrics); + app.get("/metrics", printMetrics); */ // Disabled as federation now checks for this // app.use(urlCheck); @@ -99,8 +98,8 @@ export const appFactory = async () => { route.default(app); } - app.options("*", () => { - return response(null); + app.options("*", (context) => { + return context.text("", 204); }); app.all("*", async (context) => {