Jeep
Jeep

Reputation: 53

Is there any way to enable detailed tracing of http2 requests and responses in Go?

Is there any way to enable detailed tracing of http2 requests and responses in GO?

I would like to be able to log connection attempts, timeouts, and transmission of requests so that I can diagnose production problems after the fact.

Stracing is fine during development, but it not useful for determining the details of problems after they occur.

Thank you

Upvotes: 5

Views: 5406

Answers (1)

OneOfOne
OneOfOne

Reputation: 99351

You can set the GODEBUG=http2debug=1 or GODEBUG=http2debug=2 environment variable.

Example:

 env GODEBUG=http2debug=2 go run something.go

source: http://tip.golang.org/pkg/net/http/

Upvotes: 8

Related Questions