June 1, 2026
The Go tea is on the wire
Tracing HTTP Requests with Go's net/HTTP/httptrace
Go hid a request-tracking trick in plain sight and developers are losing it
TLDR: Go has long included a built-in way to reveal the hidden steps of a web request, and many developers are only just finding out. The comments are a mix of delight, regret, and “I built this myself already,” turning a small tutorial into a mini drama about overlooked tools and developer pain.
A quiet little feature inside Go, the programming language used to build lots of internet services, has suddenly become the main character after developers realized it can show exactly what happens during a web request: when a site name gets looked up, when a connection starts, when security checks happen, and when the first bit of the reply finally arrives. The wild part? It has apparently been sitting in Go’s built-in toolbox since 2016 while, by the author’s own telling, loads of developers never touched it.
That discovery set off a very relatable comment-section spiral: equal parts awe, regret, and nerdy outrage. One developer basically screamed, “I wish I had known this two years ago,” admitting they built their own homemade tracing system instead. Ouch. Another took a swing at Hacker News itself with the deadpan complaint, “hn title mangling strikes again,” because of course even a useful technical post must first survive headline chaos. And then came the platform-war energy: one commenter turned the whole thing into a love letter to Go, arguing that moments like this prove a language is more than syntax and that Go’s polished built-in tools are what make it feel great.
Meanwhile, the author popped into the thread sounding delighted, saying the feature has been fun to use while preparing probes.dev. So yes, the article explains a clever way to trace web requests, but the real drama is the crowd reaction: half the room is inspired, half is annoyed they reinvented the wheel, and everyone is now side-eyeing the standard library for secrets it never bragged about.
Key Points
- •The article explains that Go’s `net/http/httptrace` package exposes hooks for internal phases of outgoing HTTP requests, including DNS, connection setup, TLS, request write, and first response byte.
- •Tracing is attached per request by storing a `ClientTrace` in `context.Context` with `httptrace.WithClientTrace`, rather than by configuring an interface on `http.Client` or `http.Transport`.
- •The context-based design allows tracing to propagate through middleware, avoids shared mutable client state, and supports concurrent requests with different traces on the same client.
- •`ClientTrace` is a struct of optional callback fields, so callers can enable only the hooks they need and new hooks can be added without breaking existing code.
- •The article introduces building a CLI that records timestamps from trace hooks to produce a detailed timing breakdown similar to curl’s request tracing output.