Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Proxy to Self Instrumentation #1204

Open
rubenruizdegauna opened this issue Jun 1, 2022 · 0 comments
Open

Add Proxy to Self Instrumentation #1204

rubenruizdegauna opened this issue Jun 1, 2022 · 0 comments
Labels

Comments

@rubenruizdegauna
Copy link
Contributor

rubenruizdegauna commented Jun 1, 2022

When the Infra-Agent is configured to use a Proxy, this should be added to self-instrumentation if enabled.

This can be done passing a custom Transport the APM agent (or using environment variables)

	// collectorDefaultTransport is the http.Transport to be used with
	// communication to the collector backend if a Transport is not set on the
	// Config.
	collectorDefaultTransport = &http.Transport{
		Proxy: http.ProxyFromEnvironment,
		DialContext: (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 30 * time.Second,
			DualStack: true,
		}).DialContext,
		ForceAttemptHTTP2:     true, // added in go 1.13
		MaxIdleConns:          100,
		MaxIdleConnsPerHost:   100, // note: different from default global transport
		IdleConnTimeout:       90 * time.Second,
		TLSHandshakeTimeout:   10 * time.Second,
		ExpectContinueTimeout: 1 * time.Second,
	}
@rubenruizdegauna rubenruizdegauna added the bug Categorizes issue or PR as related to a bug. label Jun 1, 2022
@davidgit davidgit added sustain and removed bug Categorizes issue or PR as related to a bug. labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants