Make prometheus metric labels strongly typed
1 file changed, 2 insertions(+), 2 deletions(-)
jump to
M src/app.ts → src/app.ts
@@ -45,12 +45,12 @@ "status_code", "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, }), };