elastic / elastic/apm

Proxy support - alignment

Open
#608 3 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Gherkin
Stars
427
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Some agents have a configuration to set a proxy to the http client which reports to APM Server.

Current status:
- [Ruby](https://www.elastic.co/guide/en/apm/agent/ruby/current/configuration.html#config-proxy-address)
- 5 different configs: `ELASTIC_APM_` +`proxy_address`, `proxy_headers`, `proxy_password `, `proxy_port `, `proxy_username `
- Likely heavily influenced by the ruby [Http.rb](https://github.com/httprb/http/wiki/Proxy-Support) API
- [Python](https://www.elastic.co/guide/en/apm/agent/python/current/configuration.html#config-generic-http-proxy)
- 2 (or 3) different configs: `HTTP_PROXY`/`HTTPS_PROXY`, `NO_PROXY` - these are generic configs, not only for the agent. If a user wanted to use different proxy settings for the agent and the underlying app, that could be problematic.
- Go
- Uses the Go standard library's support, [net/http.ProxyFromEnvironment](https://pkg.go.dev/net/http#ProxyFromEnvironment)
- "HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions thereof). HTTPS_PROXY takes precedence over HTTP_PROXY for https requests."
- Node.js, .NET, Java, PHP : No such setting atm. (feel free to correct this if not the case)

It seems these settings are very different across agents. Some agents don't have this config (e.g. .NET) and it came up that we should support it in those agents as well.

Questions:
- Should we align across agents? (Given that these configs are very different at the moment)
- If so, what would be a good config?
- As a first suggestion I'd throw in a single config which takes a URL with a name something like `ELASTIC_APM_HTTP_PROXY` (happy to take another name, the point of the suggestion is to have a single config with a string value that takes a URL with all the URL address rules)
- If not, do we agree on having these very different configs? (can be good reasons to have it tech specific)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the Ruby, Python, and Go proxy configuration documentation and the corresponding agent HTTP-client behavior, then review how Node.js, .NET, Java, and PHP currently handle proxy settings. Done means the cross-agent alignment question has a recorded decision and a defined configuration approach for the affected agents.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, go, java, node.js, php, python, ruby
Domain
backend, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.