Skip to content
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

Log DNS resolution times when debug http is enabled #278

Merged
merged 2 commits into from
May 5, 2024

Conversation

patrobinson
Copy link
Contributor

@patrobinson patrobinson commented May 2, 2024

We print the time when a request starts and a response is received, but this also includes any DNS resolution.
To help debug slow DNS issues this PR now prints the timings when it starts/stops.

Inspired by golang/go#21906 (comment)

Output:

dns start: 2024-05-03 17:25:37.519031 +1000 AEST m=+0.013530292
dns done: 2024-05-03 17:25:37.556161 +1000 AEST m=+0.050660126
connection start: 2024-05-03 17:25:37.556272 +1000 AEST m=+0.050770667
connection done: 2024-05-03 17:25:37.708357 +1000 AEST m=+0.202855251
TLS Handshake start: 2024-05-03 17:25:37.70846 +1000 AEST m=+0.202958042
TLS Handshake done: 2024-05-03 17:25:37.872324 +1000 AEST m=+0.366821292
wrote headers: 2024-05-03 17:25:37.872614 +1000 AEST m=+0.367111959
wrote request: 2024-05-03 17:25:37.87262 +1000 AEST m=+0.367117334

@patrobinson patrobinson requested review from DrJosh9000 and moskyb May 2, 2024 07:19
@patrobinson patrobinson force-pushed the debug-dns-resolution branch from 15f11ff to 9c10b31 Compare May 3, 2024 07:27
@patrobinson patrobinson merged commit 278ab48 into master May 5, 2024
1 check passed
@patrobinson patrobinson deleted the debug-dns-resolution branch May 5, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants