From f59ec466de05b9cd1090f55929367a192b3ce979 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 17 Dec 2022 19:00:40 +1100 Subject: comments and such --- src/bundle/Server.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/bundle') diff --git a/src/bundle/Server.ts b/src/bundle/Server.ts index 1ae9511c..3ceebc06 100644 --- a/src/bundle/Server.ts +++ b/src/bundle/Server.ts @@ -54,12 +54,14 @@ async function main() { Sentry.addGlobalEventProcessor((event, hint) => { if (event.transaction) { + // Rewrite things that look like IDs to `:id` for sentry event.transaction = event.transaction .split("/") .map((x) => (!parseInt(x) ? x : ":id")) .join("/"); } + // TODO: does this even do anything? delete event.request?.cookies; if (event.request?.headers) { delete event.request.headers["X-Real-Ip"]; @@ -70,16 +72,11 @@ async function main() { if (event.breadcrumbs) { event.breadcrumbs = event.breadcrumbs.filter((x) => { + // Filter breadcrumbs that we don't care about if (x.message?.includes("identified as")) return false; if (x.message?.includes("[WebSocket] closed")) return false; - if ( - x.message?.includes( - "Got Resume -> cancel not implemented", - ) - ) - return false; - if (x.message?.includes("[Gateway] New connection from")) - return false; + if (x.message?.includes("Got Resume -> cancel not implemented")) return false; + if (x.message?.includes("[Gateway] New connection from")) return false; return true; }); -- cgit 1.4.1