Tracing HTTP Requests with Go's net/HTTP/httptrace
187 points by speckx
by melodyogonna
2 subcomments
Little things like this are why Go is great. People make arguments against Go based just on available language syntax, but languages are more than just syntax; it is about the end-to-end development flow. I actually think C# and the .NET platform are the only other ecosystem that looks at development the same way. In most other ecosystems, you almost always need to step outside what the built-in language platform provides for any moderately complicated use-case.
by blainsmith
0 subcomment
Author here... Thanks for sharing this. It has been fun to use while we get ready to launch https://probes.dev with tracing being core to the service.
by matltc
0 subcomment
I picked up Go a couple weeks ago. It's giving me the same warm feeling I get when I read Ruby. When I got to the concurrency section in the tour, I fell in love. Channels and goroutines blew my mind, especially because I had been wrestling with websockets in Node.
by s-macke
1 subcomments
I wish I had known this two years ago. I ended up writing my own embedded connection struct to trace these things [0].
Nice! Tracking connection reuse is really important if you are running any kind of benchmarks or comparisons both as the author of a new tool / service and as the person evaluating different options or client libraries.
I've hit a lot of walls not ensuring I was using connection pools correctly even when the service I'm calling was local/docker. File descriptor exhaustion happens often if you're not careful.
by lanycrost
0 subcomment
Go always surprise me how well organized and well packed it is. I always used to work with opentelemetry but this core library look very strong and good. Thanks for this info