From f6f6f79e6b2114711a8c7aa51313f8203ebdf603 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Sat, 26 Jul 2025 10:56:33 +0200 Subject: fix: prometheus add karakeep prefix to metrics (#1780) * add: prometheus karakeep prefix * readd: comments --- packages/trpc/stats.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'packages/trpc') diff --git a/packages/trpc/stats.ts b/packages/trpc/stats.ts index 465bddcd..1e573f86 100644 --- a/packages/trpc/stats.ts +++ b/packages/trpc/stats.ts @@ -17,7 +17,7 @@ import { // Queue metrics const 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 metrics const 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 metrics const 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 metrics const 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 metrics const 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"], }); -- cgit v1.2.3-70-g09d2