fix log ids

This commit is contained in:
Maycon Santos
2025-05-08 03:20:48 +02:00
parent 22ac5ea0e8
commit 779643463d

View File

@@ -1021,32 +1021,32 @@ func (am *DefaultAccountManager) getValidatedPeerWithMap(ctx context.Context, is
if err != nil {
return nil, nil, nil, err
}
log.WithContext(ctx).Debugf("getValidatedPeerWithMap: took %s", time.Since(start))
log.WithContext(ctx).Debugf("GetAccountWithBackpressure: took %s", time.Since(start))
start = time.Now()
approvedPeersMap, err := am.integratedPeerValidator.GetValidatedPeers(account.Id, maps.Values(account.Groups), maps.Values(account.Peers), account.Settings.Extra)
if err != nil {
return nil, nil, nil, err
}
log.WithContext(ctx).Debugf("getValidatedPeerWithMap: took %s", time.Since(start))
log.WithContext(ctx).Debugf("GetValidatedPeers: took %s", time.Since(start))
start = time.Now()
postureChecks, err := am.getPeerPostureChecks(account, peer.ID)
if err != nil {
return nil, nil, nil, err
}
log.WithContext(ctx).Debugf("getValidatedPeerWithMap: took %s", time.Since(start))
log.WithContext(ctx).Debugf("getPeerPostureChecks: took %s", time.Since(start))
start = time.Now()
customZone := account.GetPeersCustomZone(ctx, am.GetDNSDomain(account.Settings))
log.WithContext(ctx).Debugf("getValidatedPeerWithMap: took %s", time.Since(start))
log.WithContext(ctx).Debugf("GetPeersCustomZone: took %s", time.Since(start))
start = time.Now()
proxyNetworkMaps, err := am.proxyController.GetProxyNetworkMaps(ctx, account.Id)
if err != nil {
log.WithContext(ctx).Errorf("failed to get proxy network maps: %v", err)
return nil, nil, nil, err
}
log.WithContext(ctx).Debugf("getValidatedPeerWithMap: took %s", time.Since(start))
log.WithContext(ctx).Debugf("GetProxyNetworkMaps: took %s", time.Since(start))
start = time.Now()
networkMap := account.GetPeerNetworkMap(ctx, peer.ID, customZone, approvedPeersMap, account.GetResourcePoliciesMap(), account.GetResourceRoutersMap(), am.metrics.AccountManagerMetrics())
log.WithContext(ctx).Debugf("getValidatedPeerWithMap: took %s", time.Since(start))
log.WithContext(ctx).Debugf("GetPeerNetworkMap: took %s", time.Since(start))
proxyNetworkMap, ok := proxyNetworkMaps[peer.ID]
if ok {
networkMap.Merge(proxyNetworkMap)