Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This helped a sponsor in troubleshooting an issue with config reloads. With a lot of domain names, the error message got truncated, making it impossible to read the actual error.
This patch limits how many domain names appear in the log/error messages, and in one case we just replace the list of names with the number, since the log emitted just above emits the names.
Part of the problem was also that we only read the first 10 KB of the error, which is totally plenty 99.99% of the time, but when there's lots of domain names, they can run the error past that size, so I increased the limit to 2 MB. This is a HUGE limit, but the idea is to prevent a faulty backend from flooding the client with a huge garbage response accidentally. I think I meant for the limit to be 100 KB or 1 MB, not 10 KB. Oh well.
Verified to have helped troubleshoot a production issue.