[PR #295] [CLOSED] feat: add prometheus metrics #879

Open
opened 2025-10-07 00:23:58 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/295
Author: @nikdoof
Created: 3/4/2025
Status: Closed

Base: mainHead: prometheus_metrics


📝 Commits (1)

  • 9f05d85 feat: add prometheus metrics

📊 Changes

4 files changed (+137 additions, -0 deletions)

View changed files

📝 backend/go.mod (+8 -0)
📝 backend/go.sum (+16 -0)
📝 backend/internal/bootstrap/router_bootstrap.go (+5 -0)
backend/internal/middleware/metrics.go (+108 -0)

📄 Description

Resolves #262

This uses the upstream supported mod of github.com/prometheus/client_golang/prometheus/promhttp. Additions consists of a middleware and a singular route to handle /metrics.

By using the standard prometheus_client library we also get a lot of free metrics for the Go internals, the additional middleware records any requests handled by Gin.


🔄 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/pocket-id/pocket-id/pull/295 **Author:** [@nikdoof](https://github.com/nikdoof) **Created:** 3/4/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `prometheus_metrics` --- ### 📝 Commits (1) - [`9f05d85`](https://github.com/pocket-id/pocket-id/commit/9f05d8584cbb18e70d9f04fdb9754aa4b5b52beb) feat: add prometheus metrics ### 📊 Changes **4 files changed** (+137 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/go.mod` (+8 -0) 📝 `backend/go.sum` (+16 -0) 📝 `backend/internal/bootstrap/router_bootstrap.go` (+5 -0) ➕ `backend/internal/middleware/metrics.go` (+108 -0) </details> ### 📄 Description Resolves #262 This uses the upstream supported mod of `github.com/prometheus/client_golang/prometheus/promhttp`. Additions consists of a middleware and a singular route to handle `/metrics`. By using the standard `prometheus_client` library we also get a lot of free metrics for the Go internals, the additional middleware records any requests handled by Gin. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-07 00:23:58 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#879