Files
netbird/client/internal/metrics/noop.go
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

23 lines
344 B
Go

package metrics
import (
"context"
"io"
)
// noopMetrics is a no-op implementation of metricsImplementation
type noopMetrics struct{}
func (s *noopMetrics) RecordConnectionStages(
_ context.Context,
_ ConnectionType,
_ bool,
_ ConnectionStageTimestamps,
) {
// No-op
}
func (s *noopMetrics) Export(_ io.Writer) error {
return nil
}