-
Notifications
You must be signed in to change notification settings - Fork 4.9k
DNS failure logs to be logged on info level instead of debug level #39142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you use stats https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/dns_resolution.html to identify the failures? These logs can spam if there are my dns clusters in mesh |
All are summarised counters at per Envoy, without details on which specific FQDN like test.example.comlookup actually failed and respective failure reason. |
You can also get which cluster DNS resolution failed with update_failure metric on cluster. If you still want logging, you can use https://www.envoyproxy.io/docs/envoy/v1.34.0/operations/cli.html#cmdoption-component-log-level and enable it just for dns like dns:debug |
Enabling the dns:debug level prints the unwanted success logs as well, right? |
You can use fine grain logger to limit the log messages emitted by Envoy. https://www.envoyproxy.io/docs/envoy/latest/operations/cli#cmdoption-enable-fine-grain-logging Generally logging DNS errors in debug log file is not a viable approach as even at info level a busy proxy can produce too many log entries. However I'm unsure hot to surface DNS diagnostics in an easy way as Envoy does not have access log for DNS resolutions. Maybe others can suggest something. |
Since debug logs are not enabled by default, any DNS errors occurring in the system may go unnoticed, potentially masking issues until an external user reports them. Given the minimal volume of DNS errors compared to the current logging activity in an active traffic system, enabling logs for these errors is essential to ensure timely awareness of potential problems. |
waiting for the response on this. |
Changing the level of DNS error messages in dns_impl.cc to info can product a log spam for Envoy deployments that use dynamic forwarding proxy where DNS resolution errors can be common. I do not think this is practical. If you need to monitor DNS resolution for clusters where error rate is lower, can use fine grain logger to just enable messages from dns_impl.cc ? To better isolate the errors we can downgrade the rest of messages in this file to trace. |
Thanks @yanavlasov for the response, I agree with you that isolating the error logs from general logs, i.e.
|
@ramaraochavali and @yanavlasov, |
Sure. As long as info level is not touched, I am fine with that. |
Hi @ramaraochavali and @yanavlasov, grep -ir "ENVOY_LOG(warn" . Based on this, I would like to derive the following options.
Please suggest a best suitable one to proceed on this. |
Apple DNS resolver is not used in production environments. You can either go with 2 or 3. |
Uh oh!
There was an error while loading. Please reload this page.
Title: DNS failure logs to be logged as info instead of debug
Description:
Sample Log:
2025-04-16T08:59:11.694103Z debug envoy dns external/envoy/source/extensions/network/dns_resolver/cares/dns_impl.cc:152 dns resolution for myapp.net failed with c-ares status 11 thread=19
[optional Relevant Links:]
The text was updated successfully, but these errors were encountered: