
Introducing HTTP Tracing - JepZ
https://blog.golang.org/http-tracing
======
aleem
HTTPStat
[https://github.com/davecheney/httpstat](https://github.com/davecheney/httpstat)
now uses the HTTP Tracing library to provide some pretty neat graphs, letting
you visualise the HTTP Tracing output.

    
    
        $ httpstat https://news.ycombinator.com
    
        HTTP/1.1 200 OK
        Date: Wed, 05 Oct 2016 05:23:28 GMT
        Content-Type: text/html; charset=utf-8
        Transfer-Encoding: chunked
        Connection: keep-alive
        Vary: Accept-Encoding
        Cache-Control: private
        X-Frame-Options: DENY
        Cache-Control: max-age=0
        Strict-Transport-Security: max-age=31556900; includeSubDomains
        Server: cloudflare-nginx
        CF-RAY: 2ece7111d9ba29c4-MCT
    
    
    
          DNS Lookup   TCP Connection   SSL Handshake   Server Processing   Content Transfer
        [     5ms    |      152ms     |     508ms     |      1285ms       |       226ms      ]
                     |                |               |                   |                  |
            namelookup:5ms            |               |                   |                  |
                                connect:157ms         |                   |                  |
                                            pretransfer:665ms             |                  |
                                                              starttransfer:1950ms           |
                                                                                         total:2176ms

~~~
ubercow
This looks awesome. Will have to check this out tomorrow.

------
buckhx
I haven't explicitly needed HTTP tracing yet, but am glad to see it's added to
the tool set specifically for debugging DNS which can be tough.

On another note, it's pretty f*cking lame that the only discussion in this
post is a tangent about error checking and not even remotely related to the
content.

~~~
Karunamon
Is it bad that the first thought that came to mind upon reading the example
code on the page is "Wow, this is ugly"?

...And I don't mean the "if err" sprinkling that has a whole subthread, I mean
the actual layout of the code. It's not hard to understand just.. ugly.
Aesthetically. And it's hard for me to put my finger on why.. maybe it's the
symbols everywhere.

I was about ready to make a remark about how I hope that's not idiomatic go
code, but no, this is from the official site.

I've never wanted to like a language that makes me not want to like it as much
as Go, and that's the god's honest truth.

~~~
icholy
lots of time I see people compromise readability to chase this "beauty" and
"elegance". Go makes this practically impossible.

~~~
hueving
Python is pretty readable but it doesn't look like someone smashed the
keyboard while holding down the shift key.

~~~
icholy
Python is pretty hit and miss with readability.

------
Karupan
Great to see this as part of the core language! Say what you will about Go,
the core libs and tools are well designed and really useful.

------
tpl
I wonder if this will help any of the opentracing work? Cool to see this added
as a first class citizen.

------
ejholmes
This has been one of my favorite new additions to Go 1.7. Incredibly useful
for debugging persistent connection pool efficiency.

