Svelte Hacker News logo
  • top
  • new
  • best
  • show
  • ask
  • jobs
  • about

Tracing HTTP Requests with Go's net/HTTP/httptrace

blainsmith.com

62 points by speckx 3 days ago

s-macke 24 minutes ago

I wish I had known this two years ago. I ended up writing my own embedded connection struct to trace these things [0].

  type Connection struct {
    net.Conn
    OnEventCallback func(clientClosed bool, serverClosed bool, err error)
  }

[0] https://github.com/s-macke/SlapperX/blob/master/src/tracing/...