about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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,