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.
This commit is contained in:
Freddy 2021-07-23 16:36:17 -06:00 committed by GitHub
parent c271976445
commit 57ca0ed480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
.changelog/10689.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
proxycfg: log correlation IDs for the proxy configuration snapshot's blocking queries.
```

View File

@ -277,7 +277,7 @@ func (s *state) run(ctx context.Context, snap *ConfigSnapshot) {
case <-ctx.Done(): case <-ctx.Done():
return return
case u := <-s.ch: 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.handler.handleUpdate(ctx, u, snap); err != nil { if err := s.handler.handleUpdate(ctx, u, snap); err != nil {
s.logger.Error("Failed to handle update from watch", s.logger.Error("Failed to handle update from watch",