boulder/bdns
Daniel McCarney 6ed4ce23a8
bdns: move logDNSError to exchangeOne, log ErrId specially. (#4553)
We've found we need the context offered from logging the error closer to when it
happens in the `bdns` package rather than in the `va`. Adopting the function
requires adapting it slightly. Specifically in the new location we know it won't
be called with any timeout results, with a non-dns error, or with a nil
underlying error.

Having the logging done in `bdns` (and specifically from `exchangeOne`) also
lets us log the wire format of the query and response when we get a `dns.ErrId`
error indicating a query/response ID mismatch. A small unit test is included
that ensures the logging happens as expected.

In case it proves useful for matching against other metrics the DNS ID mismatch
error case also now increments a dedicated prometheus counter vector stat,
`dns_id_mismatch`. The stat is labelled by resolver and query type.

Resolves https://github.com/letsencrypt/boulder/issues/4532
2019-11-15 16:03:45 -05:00
..
dns.go bdns: move logDNSError to exchangeOne, log ErrId specially. (#4553) 2019-11-15 16:03:45 -05:00
dns_test.go bdns: move logDNSError to exchangeOne, log ErrId specially. (#4553) 2019-11-15 16:03:45 -05:00
mocks.go bdns: move logDNSError to exchangeOne, log ErrId specially. (#4553) 2019-11-15 16:03:45 -05:00
problem.go VA: log internal DNS errors. (#4520) 2019-11-04 09:09:24 -05:00
problem_test.go Consistently used stdlib context package (#4229) 2019-05-28 14:36:16 -04:00