A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix: prometheus add karakeep prefix to metrics (#1780)
Tobiasf6f6f79e6b21
diff --git a/packages/trpc/stats.ts b/packages/trpc/stats.tsindex 465bddcd..1e573f86 100644--- a/packages/trpc/stats.ts+++ b/packages/trpc/stats.ts@@ -17,7 +17,7 @@ import {// Queue metricsconst queuePendingJobsGauge = new Gauge({- name: "queue_jobs",+ name: "karakeep_queue_jobs",help: "Number of jobs in each background queue",labelNames: ["queue_name", "status"],async collect() {@@ -58,7 +58,7 @@ const queuePendingJobsGauge = new Gauge({// User metricsconst totalUsersGauge = new Gauge({- name: "total_users",+ name: "karakeep_total_users",help: "Total number of users in the system",async collect() {try {@@ -73,7 +73,7 @@ const totalUsersGauge = new Gauge({// Asset metricsconst totalAssetSizeGauge = new Gauge({- name: "total_asset_size_bytes",+ name: "karakeep_total_asset_size_bytes",help: "Total size of all assets in bytes",async collect() {try {@@ -90,7 +90,7 @@ const totalAssetSizeGauge = new Gauge({// Bookmark metricsconst totalBookmarksGauge = new Gauge({- name: "total_bookmarks",+ name: "karakeep_total_bookmarks",help: "Total number of bookmarks in the system",async collect() {try {@@ -105,19 +105,19 @@ const totalBookmarksGauge = new Gauge({// Api metricsconst apiRequestsTotalCounter = new Counter({- name: "trpc_requests_total",+ name: "karakeep_trpc_requests_total",help: "Total number of API requests",labelNames: ["type", "path", "is_error"],});const apiErrorsTotalCounter = new Counter({- name: "trpc_errors_total",+ name: "karakeep_trpc_errors_total",help: "Total number of API requests",labelNames: ["type", "path", "code"],});const apiRequestDurationSummary = new Summary({- name: "trpc_request_duration_seconds",+ name: "karakeep_trpc_request_duration_seconds",help: "Duration of tRPC requests in seconds",labelNames: ["type", "path"],});