[PR #5204] [CLOSED] [client] Feature/client metrics #25229

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5204
Author: @pappz
Created: 1/28/2026
Status: Closed

Base: mainHead: feature/client-metrics


📝 Commits (10+)

  • c5eb5ba Add client metrics
  • e3a5c44 Add client metrics system with OpenTelemetry and VictoriaMetrics support
  • bb377a2 Merge main branch into feature/client-metrics
  • 5f02a48 Merge branch 'main' into feature/client-metrics
  • 5169129 Add signaling metrics tracking for initial and reconnection attempts
  • cbfde79 Reset connection stage timestamps during reconnections to exclude unnecessary metrics tracking
  • 08295e5 Delete otel lib from client
  • e7283a8 Update unit tests
  • 138e728 Invoke callback on handshake success in WireGuard watcher
  • 80abddb Merge branch 'main' into feature/client-metrics

📊 Changes

17 files changed (+598 additions, -39 deletions)

View changed files

📝 client/internal/debug/debug.go (+31 -0)
📝 client/internal/engine.go (+31 -7)
client/internal/metrics/connection_type.go (+17 -0)
client/internal/metrics/deployment_type.go (+46 -0)
client/internal/metrics/metrics.go (+77 -0)
client/internal/metrics/victoria.go (+129 -0)
📝 client/internal/peer/conn.go (+96 -17)
📝 client/internal/peer/handshaker.go (+21 -7)
client/internal/peer/metrics_saver.go (+104 -0)
📝 client/internal/peer/wg_watcher.go (+6 -4)
📝 client/internal/peer/wg_watcher_test.go (+6 -4)
📝 client/server/debug.go (+8 -0)
📝 go.mod (+3 -0)
📝 go.sum (+6 -0)
📝 shared/management/client/client.go (+1 -0)
📝 shared/management/client/grpc.go (+7 -0)
📝 shared/management/client/mock.go (+9 -0)

📄 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/__


🔄 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/5204 **Author:** [@pappz](https://github.com/pappz) **Created:** 1/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/client-metrics` --- ### 📝 Commits (10+) - [`c5eb5ba`](https://github.com/netbirdio/netbird/commit/c5eb5ba1c6e8dbc41343c1c06ff7e6b0222765a4) Add client metrics - [`e3a5c44`](https://github.com/netbirdio/netbird/commit/e3a5c44d37e2e60560506d637f659d7e5cba1f1f) Add client metrics system with OpenTelemetry and VictoriaMetrics support - [`bb377a2`](https://github.com/netbirdio/netbird/commit/bb377a2885126ea651dc7c14915ad76a04647f2a) Merge main branch into feature/client-metrics - [`5f02a48`](https://github.com/netbirdio/netbird/commit/5f02a487374e6994530f69da1066b6491f8bb08c) Merge branch 'main' into feature/client-metrics - [`5169129`](https://github.com/netbirdio/netbird/commit/5169129029f891e2f5c97c1006fbb6e630e6dc0c) Add signaling metrics tracking for initial and reconnection attempts - [`cbfde79`](https://github.com/netbirdio/netbird/commit/cbfde79dd8f4dc324c37e031bb354e153cb05910) Reset connection stage timestamps during reconnections to exclude unnecessary metrics tracking - [`08295e5`](https://github.com/netbirdio/netbird/commit/08295e511619aeec7f908c1e059d2f6c22cc9969) Delete otel lib from client - [`e7283a8`](https://github.com/netbirdio/netbird/commit/e7283a81985e27b2e7f4045b0b1981270d47b732) Update unit tests - [`138e728`](https://github.com/netbirdio/netbird/commit/138e728427c100fbfba71d1a4bb840b2142ec330) Invoke callback on handshake success in WireGuard watcher - [`80abddb`](https://github.com/netbirdio/netbird/commit/80abddb78a851a59847b9780a7467b4ddace285a) Merge branch 'main' into feature/client-metrics ### 📊 Changes **17 files changed** (+598 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/debug/debug.go` (+31 -0) 📝 `client/internal/engine.go` (+31 -7) ➕ `client/internal/metrics/connection_type.go` (+17 -0) ➕ `client/internal/metrics/deployment_type.go` (+46 -0) ➕ `client/internal/metrics/metrics.go` (+77 -0) ➕ `client/internal/metrics/victoria.go` (+129 -0) 📝 `client/internal/peer/conn.go` (+96 -17) 📝 `client/internal/peer/handshaker.go` (+21 -7) ➕ `client/internal/peer/metrics_saver.go` (+104 -0) 📝 `client/internal/peer/wg_watcher.go` (+6 -4) 📝 `client/internal/peer/wg_watcher_test.go` (+6 -4) 📝 `client/server/debug.go` (+8 -0) 📝 `go.mod` (+3 -0) 📝 `go.sum` (+6 -0) 📝 `shared/management/client/client.go` (+1 -0) 📝 `shared/management/client/grpc.go` (+7 -0) 📝 `shared/management/client/mock.go` (+9 -0) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-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](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## 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/__ --- <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:05:43 -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#25229