[PR #2476] [MERGED] [management] Refactor HTTP metrics #15216

Closed
opened 2026-08-05 03:07:11 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2476
Author: @bcmmbaga
Created: 8/23/2024
Status: Merged
Merged: 8/23/2024
Merged by: @bcmmbaga

Base: mainHead: add-api-req-metrics


📝 Commits (4)

  • 3778662 Add logging for slow SQL queries in SaveAccount and GetAccount
  • ba3fc26 Add resource count log for large accounts
  • 6bd0947 Refactor metrics middleware to simplify counters and histograms
  • 04e6a3d Update log levels and remove redundant resource count check

📊 Changes

4 files changed (+67 additions, -99 deletions)

View changed files

📝 management/server/account.go (+6 -0)
📝 management/server/http/handler.go (+0 -21)
📝 management/server/sql_store.go (+13 -0)
📝 management/server/telemetry/http_api_metrics.go (+48 -78)

📄 Description

Describe your changes

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/2476 **Author:** [@bcmmbaga](https://github.com/bcmmbaga) **Created:** 8/23/2024 **Status:** ✅ Merged **Merged:** 8/23/2024 **Merged by:** [@bcmmbaga](https://github.com/bcmmbaga) **Base:** `main` ← **Head:** `add-api-req-metrics` --- ### 📝 Commits (4) - [`3778662`](https://github.com/netbirdio/netbird/commit/37786625b9b4cc5a734239cf9b1f13e6185dc577) Add logging for slow SQL queries in SaveAccount and GetAccount - [`ba3fc26`](https://github.com/netbirdio/netbird/commit/ba3fc262cd36deb83fe3eea406d2f7a1ba0bb304) Add resource count log for large accounts - [`6bd0947`](https://github.com/netbirdio/netbird/commit/6bd0947b55e508e2f00b73cc0a680e1e1f5b7558) Refactor metrics middleware to simplify counters and histograms - [`04e6a3d`](https://github.com/netbirdio/netbird/commit/04e6a3df1417ad6b1794b98f130cb12790d7c717) Update log levels and remove redundant resource count check ### 📊 Changes **4 files changed** (+67 additions, -99 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+6 -0) 📝 `management/server/http/handler.go` (+0 -21) 📝 `management/server/sql_store.go` (+13 -0) 📝 `management/server/telemetry/http_api_metrics.go` (+48 -78) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 03:07:11 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#15216