From b2640803745636e87e42f5460759093f49df9d04 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 8 Feb 2026 01:33:48 +0000 Subject: feat(metrics): add prometheus metric for bookmark crawl latency (#2461) Track the time from bookmark creation to crawl completion as a histogram (karakeep_bookmark_crawl_latency_seconds). This measures the end-to-end latency users experience when adding bookmarks via extension, web, etc. Excludes recrawls (crawledAt already set) and imports (low priority jobs). https://claude.ai/code/session_019jTGGXGWzK9C5aTznQhdgz Co-authored-by: Claude --- apps/workers/workerUtils.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/workers/workerUtils.ts') diff --git a/apps/workers/workerUtils.ts b/apps/workers/workerUtils.ts index a99f2103..48e3b277 100644 --- a/apps/workers/workerUtils.ts +++ b/apps/workers/workerUtils.ts @@ -31,6 +31,8 @@ export async function getBookmarkDetails(bookmarkId: string) { return { url: bookmark.link.url, userId: bookmark.userId, + createdAt: bookmark.createdAt, + crawledAt: bookmark.link.crawledAt, screenshotAssetId: bookmark.assets.find( (a) => a.assetType == AssetTypes.LINK_SCREENSHOT, )?.id, -- cgit v1.2.3-70-g09d2