Improve debug logging from SDK around transport #480
Merged
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.
When troubleshooting slow network calls, the calling code wants deep insights into the retry handling logic, to see if any retry-sleep is happening. This adds many more lines of debug to make that information available when debug logging is enabled.
I'm not overly concerned with testing the logging code explicitly (e.g. with log capturing). I think it's enough to try it out and see that it provides useful info in this case. But if anything I've done looks unusual, we can add a test or two for it.
The only thing which is maybe interesting is the
__getattr__
call, but that's easy to test as:I ran a CLI version using this to run down some slow calls.
log sample from modified globus-cli