In Go 1.7 the HTTP tracing package was introduced to facilitate the gathering of fine-grained information throughout the lifecycle of an HTTP client request. Support for HTTP tracing is provided by the net/http/httptrace package. The collected information can be used for debugging latency issues, service monitoring, writing adaptive systems, and more.
The httptrace package provides a number of hooks to gather information during an HTTP round trip about a variety of events. These events include:
- Connection creation
- Connection reuse
- DNS lookups
- Writing the request to the wire
- Reading the response
Introducing HTTP Tracing - Jaana Burcu Dogan
Tracing events (Go Playground)
Tracing with http.Client (Go Playground)
TBD
All material is licensed under the Apache License Version 2.0, January 2004.