From 9265d208593f2604d0f2cafff914c1e4ba61d55f Mon Sep 17 00:00:00 2001 From: Freddy Date: Fri, 23 Jul 2021 16:36:17 -0600 Subject: [PATCH] Log the correlation ID when blocking queries fire (#10689) Knowing that blocking queries are firing does not provide much information on its own. If we know the correlation IDs we can piece together which parts of the snapshot have been populated. Some of these responses might be empty from the blocking query timing out. But if they're returning quickly I think we can reasonably assume they contain data. --- .changelog/10689.txt | 3 +++ agent/proxycfg/state.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/10689.txt diff --git a/.changelog/10689.txt b/.changelog/10689.txt new file mode 100644 index 0000000000..65a4606155 --- /dev/null +++ b/.changelog/10689.txt @@ -0,0 +1,3 @@ +```release-note:improvement +proxycfg: log correlation IDs for the proxy configuration snapshot's blocking queries. +``` diff --git a/agent/proxycfg/state.go b/agent/proxycfg/state.go index 93becd8efb..d5bc935547 100644 --- a/agent/proxycfg/state.go +++ b/agent/proxycfg/state.go @@ -638,7 +638,7 @@ func (s *state) run(snap *ConfigSnapshot) { case <-s.ctx.Done(): return case u := <-s.ch: - s.logger.Trace("A blocking query returned; handling snapshot update") + s.logger.Trace("A blocking query returned; handling snapshot update", "correlationID", u.CorrelationID) if err := s.handleUpdate(u, snap); err != nil { s.logger.Error("Failed to handle update from watch",