Merge pull request #47417 from thaJeztah/resolver_improve_logs
libnetwork: resolve: use structured logs for DNS error
This commit is contained in:
commit
c42ae61e62
1 changed files with 1 additions and 1 deletions
|
@ -576,7 +576,7 @@ func (r *Resolver) exchange(ctx context.Context, proto string, extDNS extDNSEntr
|
|||
UDPSize: dns.MaxMsgSize,
|
||||
}).ExchangeWithConn(query, &dns.Conn{Conn: extConn})
|
||||
if err != nil {
|
||||
r.log(ctx).WithError(err).Errorf("[resolver] failed to query DNS server: %s, query: %s", extConn.RemoteAddr().String(), query.Question[0].String())
|
||||
logger.WithError(err).Error("[resolver] failed to query external DNS server")
|
||||
span.RecordError(err)
|
||||
span.SetStatus(codes.Error, "ExchangeWithConn failed")
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue