1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| | ConfigureTransports was introduced in a newer version of
go-golang-org-x-net:
<https://github.com/golang/net/commit/08b38378de702b893ee869b94b32f833e2933bd2>
Prior to this, Prometheus didn't configure ReadIdleTimeout:
<https://github.com/prometheus/common/commit/b5c358997cbf126e8f8518cdc024c32da3996d48>
It's somewhat unclear whether ReadIdleTimeout is absolutely required to
work around the upstream issues with HTTP/2 mentioned in the codebase,
however HTTP/2 can be disabled using enable_http2 if this is the case.
diff --git a/config/http_config.go b/config/http_config.go
index 4b87241..7698ba4 100644
--- a/config/http_config.go
+++ b/config/http_config.go
@@ -411,11 +411,10 @@ func NewRoundTripperFromConfig(cfg HTTPClientConfig, name string, optFuncs ...HT
// issues again, but will be removed once we are confident that
// things work as expected.
- http2t, err := http2.ConfigureTransports(rt.(*http.Transport))
+ err := http2.ConfigureTransport(rt.(*http.Transport))
if err != nil {
return nil, err
}
- http2t.ReadIdleTimeout = time.Minute
}
// If a authorization_credentials is provided, create a round tripper that will set the
|