SIGN IN SIGN UP

resolver: log resolver state updates at verbosity 2 (#9261)

Fixes #9210

addChannelzTraceEvent logs the full resolver.State (via pretty.ToJSON)
on every UpdateState/NewAddress. The #7437 guard `!logger.V(0) &&
!channelz.IsOn()` does not fire at the default verbosity (logger.V(0) is
true), so with channelz off the whole state is marshalled on every
update only to be discarded by the default ERROR-level logger. See #9210
for benchmarks and analysis.

V(2) is the verbosity used for detailed logs throughout the tree (this
was the only V(0) gate). channelz, when enabled, still records the
event.

Behavior change: at the default verbosity the "Resolver state updated"
message no longer logs; it now requires -v 2.

RELEASE NOTES:
* resolver: only log resolver state updates at verbosity 2 or higher,
avoiding a full marshal of the resolver state on every update when
channelz is off and verbose logging is disabled
L
Luca Cucchetti committed
116e945bb68b03851b971a3547d4a606c2feadf8
Parent: 6656535
Committed by GitHub <noreply@github.com> on 7/24/2026, 5:12:53 AM