From df9f814bc11fb462092ac07c758dfefbbf262655 Mon Sep 17 00:00:00 2001 From: Denis Mishin Date: Wed, 1 Nov 2023 12:40:27 -0400 Subject: [PATCH] xds: add type url to log --- internal/controlplane/xdsmgr/xdsmgr.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/controlplane/xdsmgr/xdsmgr.go b/internal/controlplane/xdsmgr/xdsmgr.go index 14309c6d3..31271b43b 100644 --- a/internal/controlplane/xdsmgr/xdsmgr.go +++ b/internal/controlplane/xdsmgr/xdsmgr.go @@ -108,6 +108,7 @@ func (mgr *Manager) DeltaAggregatedResources( // neither an ACK or a NACK case req.GetErrorDetail() != nil: log.Info(ctx). + Str("type-url", req.GetTypeUrl()). Any("error-detail", req.GetErrorDetail()). Msg("xdsmgr: nack") // a NACK @@ -118,6 +119,7 @@ func (mgr *Manager) DeltaAggregatedResources( } case req.GetResponseNonce() == mgr.nonce: log.Info(ctx). + Str("type-url", req.GetTypeUrl()). Msg("xdsmgr: ack") // an ACK for the last response // - set the client resource versions to the current resource versions @@ -128,6 +130,7 @@ func (mgr *Manager) DeltaAggregatedResources( default: // an ACK for a response that's not the last response log.Info(ctx). + Str("type-url", req.GetTypeUrl()). Msg("xdsmgr: ack") } @@ -209,6 +212,7 @@ func (mgr *Manager) DeltaAggregatedResources( return ctx.Err() case res := <-outgoing: log.Info(ctx). + Str("type-url", res.GetTypeUrl()). Int("resource-count", len(res.GetResources())). Int("removed-resource-count", len(res.GetRemovedResources())). Msg("xdsmgr: sending resources")