Skip to content

Commit

Permalink
Fix: use proxy values from environment in metrics publisher
Browse files Browse the repository at this point in the history
We are using a custom transport to publish metrics and logs to the
remote databases. Because of that, in order to use a proxy specified in
the environment, we need to pass a proxy function.

Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
  • Loading branch information
mem committed Mar 9, 2023
1 parent c2048ff commit 3f23e6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/pkg/prom/prom.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ func newRoundTripperFromConfig(cfg HTTPClientConfig, name string, disableKeepAli
IdleConnTimeout: 5 * time.Minute,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
Proxy: http.ProxyFromEnvironment,
DialContext: conntrack.NewDialContextFunc(
conntrack.DialWithTracing(),
conntrack.DialWithName(name),
Expand Down

0 comments on commit 3f23e6d

Please sign in to comment.