[PR #2117] [MERGED] feat: add Prometheus counter for HTTP status codes #1987

Closed
opened 2026-03-02 12:00:04 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/2117
Author: @MohamedBassem
Created: 11/10/2025
Status: Merged
Merged: 11/15/2025
Merged by: @MohamedBassem

Base: mainHead: claude/add-prometheus-status-counter-011CUywbRhDBHuM2hsyKQaMk


📝 Commits (2)

  • 3c7f11f feat: add Prometheus counter for crawler status codes
  • 74d0946 fix: update counter name to follow Prometheus conventions

📊 Changes

2 files changed (+13 additions, -1 deletions)

View changed files

📝 apps/workers/metrics.ts (+7 -0)
📝 apps/workers/workers/crawlerWorker.ts (+6 -1)

📄 Description

Add a new Prometheus metric to track HTTP status codes encountered during crawling operations. This helps monitor crawler health and identify patterns in response codes (e.g., 200 OK, 404 Not Found, etc.).

Changes:

  • Add crawlerStatusCodeCounter in metrics.ts with status_code label
  • Instrument crawlerWorker.ts to track status codes after page crawling
  • Counter increments for each crawl with the corresponding HTTP status code

The metric is exposed at the /metrics endpoint and follows the naming convention: karakeep_crawler_status_codes_total


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/2117 **Author:** [@MohamedBassem](https://github.com/MohamedBassem) **Created:** 11/10/2025 **Status:** ✅ Merged **Merged:** 11/15/2025 **Merged by:** [@MohamedBassem](https://github.com/MohamedBassem) **Base:** `main` ← **Head:** `claude/add-prometheus-status-counter-011CUywbRhDBHuM2hsyKQaMk` --- ### 📝 Commits (2) - [`3c7f11f`](https://github.com/karakeep-app/karakeep/commit/3c7f11fadac5fbd45fcf6ccb1e8267a6e21344b7) feat: add Prometheus counter for crawler status codes - [`74d0946`](https://github.com/karakeep-app/karakeep/commit/74d09460a63285c2c77f13a3ffe46c77fb9b8db5) fix: update counter name to follow Prometheus conventions ### 📊 Changes **2 files changed** (+13 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `apps/workers/metrics.ts` (+7 -0) 📝 `apps/workers/workers/crawlerWorker.ts` (+6 -1) </details> ### 📄 Description Add a new Prometheus metric to track HTTP status codes encountered during crawling operations. This helps monitor crawler health and identify patterns in response codes (e.g., 200 OK, 404 Not Found, etc.). Changes: - Add crawlerStatusCodeCounter in metrics.ts with status_code label - Instrument crawlerWorker.ts to track status codes after page crawling - Counter increments for each crawl with the corresponding HTTP status code The metric is exposed at the /metrics endpoint and follows the naming convention: karakeep_crawler_status_codes_total --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 12:00:04 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1987
No description provided.