Commit Graph
9 Commits
Author SHA1 Message Date
Zoltán Papp 7e276a40d9 Add total duration tracking for connection attempts
Calculate total duration for both initial connections and reconnections, accounting for different timestamp scenarios. Update `Export` method to include Prometheus HELP comments.
2026-02-11 15:41:32 +01:00
Zoltán Papp 3753bf7fc4 Remove no-op metrics implementation and simplify ClientMetrics constructor
Eliminate unused `noopMetrics` and refactor `ClientMetrics` to always use the VictoriaMetrics implementation. Update associated logic to reflect these changes.
2026-02-11 15:28:59 +01:00
Zoltán Papp bec58b85b1 Add sync duration tracking to client metrics
Introduce `RecordSyncDuration` for measuring sync message processing time. Update all metrics implementations (VictoriaMetrics, no-op) to support the new method. Refactor `ClientMetrics` to use `AgentInfo` for static agent data.
2026-02-11 15:18:45 +01:00
Zoltán Papp ca3e6d93d3 Add Netbird version tracking to client metrics
Integrate Netbird version into VictoriaMetrics backend and metrics labels. Update `ClientMetrics` constructor and metric name formatting to include version information.
2026-02-11 15:02:37 +01:00
Zoltán Papp 08295e5116 Delete otel lib from client 2026-01-28 17:35:10 +01:00
Zoltán Papp cbfde79dd8 Reset connection stage timestamps during reconnections to exclude unnecessary metrics tracking 2026-01-28 17:18:22 +01:00
Zoltán Papp bb377a2885 Merge main branch into feature/client-metrics 2026-01-22 18:03:13 +01:00
Zoltán Papp e3a5c44d37 Add client metrics system with OpenTelemetry and VictoriaMetrics support
Implements a comprehensive client metrics system to track peer connection
stages and performance. The system supports multiple backend implementations
(OpenTelemetry, VictoriaMetrics, and no-op) and tracks detailed connection
stage durations from creation through WireGuard handshake.

Key changes:
- Add metrics package with pluggable backend implementations
- Implement OpenTelemetry metrics backend
- Implement VictoriaMetrics metrics backend
- Add no-op metrics implementation for disabled state
- Track connection stages: creation, semaphore, signaling, connection ready, and WireGuard handshake
- Move WireGuard watcher functionality to conn.go
- Refactor engine to integrate metrics tracking
- Add metrics export endpoint in debug server
2026-01-15 22:17:54 +01:00
Zoltán Papp c5eb5ba1c6 Add client metrics 2026-01-12 12:48:26 +01:00