We instrumented better socket option setting diagnostics in May 2021. These diagnostics however are only seen with a debug verbosity of 3 or higher. This means that they don't get shown on any of our Evergreen testing variants, since none of them expose networking logs at that high of a level.
There are a few different solutions we could try:
Always expose expanded socket option setting diagnostics in exceptions passed up from the networking layer.
- Pro: Socket option failures seen in customer cases will have more verbose diagnostics, allowing us to connect more easily customer failures to existing cases.
- Con: Each socket failure that will ever be logged will receive an addition 20-30 characters. We may be exposing extraneous and confusing information to customers.
- Amount of change: Medium
Always log socket failures in kDebugMode (aka building with debug mode) in addition to existing logging logic
- Pro: Allows us to see socket option failure information in testing.
- Con: Doesn't assist with customer cases.
- Amount of change: Low
Lower the logging threshold to verbosity level 2, allowing logs to be caught in some testing suites that set networking logs to that verbosity.
- Pro: Allows us to see socket option failure information in testing.
- Con: Doesn't assist with customer cases. Can be inconsistent and reliable on the not-always-guaranteed constraint of testing suites that have a heightened networking verbosity level.
- Amount of change: Low
I'm leaning towards the second solution, as it changes behavior in debug mode only, and allows us the most reliable path to diagnosing further issues.