Tracing HTTP Requests with Go's net/http/httptrace
Summary
This article dives into Go's net/http/httptrace, showing how to attach a ClientTrace to a request via context and how the transport can hook into DNS, connection, TLS, and response timing. It demonstrates building a curl-like CLI and a RoundTripper wrapper to log per-request timings, with practical notes on context composition and connection reuse. It's a practical guide for debugging HTTP performance in Go applications.