[management/signal/relay] add metrics descriptions (#3233)

This commit is contained in:
Pascal Fischer
2025-01-24 14:17:30 +01:00
committed by GitHub
parent 2605948e01
commit b6abd4b4da
10 changed files with 213 additions and 66 deletions

View File

@@ -1130,11 +1130,6 @@ func (am *DefaultAccountManager) UpdateAccountPeers(ctx context.Context, account
}
start := time.Now()
defer func() {
if am.metrics != nil {
am.metrics.AccountManagerMetrics().CountUpdateAccountPeersDuration(time.Since(start))
}
}()
approvedPeersMap, err := am.integratedPeerValidator.GetValidatedPeers(account.Id, maps.Values(account.Groups), maps.Values(account.Peers), account.Settings.Extra)
if err != nil {
@@ -1175,6 +1170,9 @@ func (am *DefaultAccountManager) UpdateAccountPeers(ctx context.Context, account
}
wg.Wait()
if am.metrics != nil {
am.metrics.AccountManagerMetrics().CountUpdateAccountPeersDuration(time.Since(start))
}
}
// UpdateAccountPeer updates a single peer that belongs to an account.