about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-04-11 21:05:29 +0200
committerAlan Pearce2024-04-11 21:05:29 +0200
commita926b530d3c9dd12472b918c620d8bce84e96834 (patch)
tree1e1f34b62d6a301f222df19d5244765dce350510
parente2241b8c0d1a0e5bd48d27f6ac98b3a54143da4a (diff)
downloadwebsite-a926b530d3c9dd12472b918c620d8bce84e96834.tar.lz
website-a926b530d3c9dd12472b918c620d8bce84e96834.tar.zst
website-a926b530d3c9dd12472b918c620d8bce84e96834.zip
Remove Sentry tracing (keep error logging)
-rw-r--r--src/app.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/app.ts b/src/app.ts
index d3a676f..934df05 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -154,17 +154,6 @@ export const server = {
     const endTimer = metrics.requestDuration.startTimer({ path: pathname });
     let status;
     let newpath;
-    const transaction = Sentry.startTransaction({
-      name: pathname,
-      op: "http.server",
-      description: `${request.method} ${pathname}`,
-      tags: {
-        url: request.url,
-        "http.host": hostname,
-        "http.method": request.method,
-        "http.user_agent": request.headers.get("user-agent"),
-      },
-    });
     try {
       if (pathname === "/health") {
         return new Response("OK", { status: (status = 200) });
@@ -204,7 +193,6 @@ export const server = {
             status_code: (status = 304),
             cache_basis: etagMatch ? "etag" : "mtime",
           });
-          transaction.setHttpStatus(304);
           return new Response("", { status: status, headers: defaultHeaders });
         }
         const encodings = (request.headers.get("accept-encoding") || "")
@@ -222,7 +210,6 @@ export const server = {
         }
 
         status = 200;
-        transaction.setHttpStatus(status);
         metrics.requests.inc({
           method: request.method,
           hostname,
@@ -268,14 +255,6 @@ export const server = {
             headers: { location: newpath },
           });
         }
-        metrics.requests.inc({
-          method: request.method,
-          hostname,
-          path: pathname,
-          status_code: (status = 404),
-          content_encoding: contentEncoding,
-        });
-        transaction.setHttpStatus(status);
         const notfound = files.get("/404.html");
         if (notfound) {
           return serveFile(notfound, status, {
@@ -290,7 +269,6 @@ export const server = {
         }
       }
     } catch (error) {
-      transaction.setHttpStatus((status = 503));
       metrics.requests.inc({
         method: request.method,
         hostname,
@@ -306,7 +284,6 @@ export const server = {
         const seconds = endTimer();
         metrics.requestDuration.observe(seconds);
       }
-      transaction.finish();
       log.info(
         request.method,
         status,