feat(metrics): add user label to peer metrics (#647)

This commit is contained in:
Mykhailo Roit 2026-03-21 19:52:21 +02:00 committed by GitHub
parent 402cc1b5f3
commit 243954a889
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ type MetricsServer struct {
// Wireguard metrics labels
var (
ifaceLabels = []string{"interface"}
peerLabels = []string{"interface", "addresses", "id", "name"}
peerLabels = []string{"interface", "addresses", "id", "name", "user"}
)
// NewMetricsServer returns a new prometheus server
@ -126,6 +126,7 @@ func (m *MetricsServer) UpdatePeerMetrics(peer *domain.Peer, status domain.PeerS
peer.Interface.AddressStr(),
string(status.PeerId),
peer.DisplayName,
string(peer.UserIdentifier),
}
if status.LastHandshake != nil {