Add metrics

This commit is contained in:
2025-09-15 00:13:57 +02:00
parent be5b042380
commit 33c7e2335f
8 changed files with 108 additions and 3 deletions
@@ -0,0 +1,21 @@
diff --git a/dist/runtime/registry.js b/dist/runtime/registry.js
index b06d20fce7900f947ad55f5b1b3f8e25cf9dbe84..b0cf94339671ed3042d6fc3f2c30d2d37723402a 100644
--- a/dist/runtime/registry.js
+++ b/dist/runtime/registry.js
@@ -1,4 +1,4 @@
-import { Gauge, Summary, collectDefaultMetrics, register } from "prom-client";
+import { Gauge, Summary, register } from "prom-client";
export const metrics = {
/** If `true`, metrics was initialized with `initMetrics` */
isInitialized: false,
@@ -14,10 +14,6 @@ export const metrics = {
export const initMetrics = (p) => {
if (metrics.isInitialized)
return;
- collectDefaultMetrics({
- prefix: p.prefix,
- register
- });
const prefix = p.prefix ?? "";
metrics.renderTime = new Gauge({
name: `${prefix}page_render_time`,