about summary refs log tree commit diff stats
path: root/src/app.ts
diff options
context:
space:
mode:
authorAlan Pearce2024-04-07 00:24:58 +0200
committerAlan Pearce2024-04-07 00:24:58 +0200
commit280e1745f68d35427464c5ec20159a7957e700cb (patch)
tree297b4e3b669cfa70e72f108f5844eb3bbc80dc25 /src/app.ts
parent5af5222423ffd84341145b1ef8c68abcdaba8d92 (diff)
downloadwebsite-280e1745f68d35427464c5ec20159a7957e700cb.tar.lz
website-280e1745f68d35427464c5ec20159a7957e700cb.tar.zst
website-280e1745f68d35427464c5ec20159a7957e700cb.zip
Make prometheus metric labels strongly typed
Diffstat (limited to 'src/app.ts')
-rw-r--r--src/app.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app.ts b/src/app.ts
index 72708b6..4765811 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -45,12 +45,12 @@ const metrics = {
       "hostname",
       "method",
       "content_encoding",
-    ],
+    ] as const,
   }),
   requestDuration: new prom.Histogram({
     name: "homestead_request_duration_seconds",
     help: "Request duration in seconds",
-    labelNames: ["path"],
+    labelNames: ["path"] as const,
   }),
 };