[PR #5942] [signal] log the most busy peers #27175

Open
opened 2026-08-05 07:08:19 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5942
Author: @pascal-fischer
Created: 4/21/2026
Status: 🔄 Open

Base: mainHead: feature/log-most-busy-peers


📝 Commits (4)

  • ea83cbf log the most busy peers
  • 8a7d78d make configurable via env
  • 92e53d6 generic settings overrider
  • 37b9905 Merge branch 'main' into feature/log-most-busy-peers

📊 Changes

8 files changed (+501 additions, -2 deletions)

View changed files

📝 management/internals/server/boot.go (+19 -0)
📝 management/internals/server/server.go (+11 -0)
shared/settingoverrider/overrider.go (+120 -0)
shared/settingoverrider/overrider_test.go (+111 -0)
📝 signal/cmd/run.go (+20 -1)
signal/server/send_tracker.go (+135 -0)
signal/server/send_tracker_test.go (+56 -0)
📝 signal/server/signal.go (+29 -1)

📄 Description

Describe your changes

Stack

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features

    • Per-peer send-rate tracking that runs in the background, periodically emits aggregate stats, and logs top peers; interval and top-percent threshold are configurable at runtime.
    • Runtime-configurable settings via a shared overrider (Redis-backed or noop) to adjust behavior such as log levels.
  • Tests

    • Added unit and integration tests covering send-rate tracking and overrider polling/behavior.
  • Chores

    • Startup now integrates the overrider and may halt if a Redis-backed overrider fails to initialize.

🔄 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/5942 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 4/21/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/log-most-busy-peers` --- ### 📝 Commits (4) - [`ea83cbf`](https://github.com/netbirdio/netbird/commit/ea83cbf9170592b2ca192e1779b239da36296357) log the most busy peers - [`8a7d78d`](https://github.com/netbirdio/netbird/commit/8a7d78ddf3dc89e5f28861d6c95c647a66fb11a4) make configurable via env - [`92e53d6`](https://github.com/netbirdio/netbird/commit/92e53d63193932c991e423659719296aa1f17398) generic settings overrider - [`37b9905`](https://github.com/netbirdio/netbird/commit/37b9905b68b6639c857535e7ff6e5614cc386e7f) Merge branch 'main' into feature/log-most-busy-peers ### 📊 Changes **8 files changed** (+501 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `management/internals/server/boot.go` (+19 -0) 📝 `management/internals/server/server.go` (+11 -0) ➕ `shared/settingoverrider/overrider.go` (+120 -0) ➕ `shared/settingoverrider/overrider_test.go` (+111 -0) 📝 `signal/cmd/run.go` (+20 -1) ➕ `signal/server/send_tracker.go` (+135 -0) ➕ `signal/server/send_tracker_test.go` (+56 -0) 📝 `signal/server/signal.go` (+29 -1) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Per-peer send-rate tracking that runs in the background, periodically emits aggregate stats, and logs top peers; interval and top-percent threshold are configurable at runtime. * Runtime-configurable settings via a shared overrider (Redis-backed or noop) to adjust behavior such as log levels. * **Tests** * Added unit and integration tests covering send-rate tracking and overrider polling/behavior. * **Chores** * Startup now integrates the overrider and may halt if a Redis-backed overrider fails to initialize. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 07:08:19 -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#27175