-
Notifications
You must be signed in to change notification settings - Fork 843
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
Proxy support #6204
Comments
Defining environment variables / system properties for this type of thing needs to be defined at the spec level: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md However, we could extend programatic configuration for these options. The trick will be figuring out how proxy config manifests in different http clients (like the jdk httpclient and okhttp clients we use) and exposing some sort of generic representation. I'm open to adding support for this if somebody wants to contribute it. In the short term, you might consider exporting to a collector running the otlphttpexporter, which does support proxy configuration. The docs don't mention it - support was added recently and the option is sort of a "hidden option" at the moment. See this issue for more details. |
I am already preparing a PR, will push it soon. |
The PR is here: #6206 |
Am I to understand that this cannot be used yet via java-instrumentation? Not until config names are chosen in the spec then implemented? |
It can be used with the otel java agent, but not by setting env vars / system properties. You need to add an extension which customizes the SDK configuration to set the proxy options on the autoconfigured OTLP exporters. |
Is your feature request related to a problem? Please describe.
We are working in a highly regulated environment which requires usage of a proxy to emit metrics, traces and logs. Unfortunately it is not possible to have a proxy configuration for your library, at least not for OkHttp, which explicitly requires such configuration. The JDK client might be able to pick up the common JRE properties for proxies. Still, this would not be what we need, as we explicitly only want to have OpenTelemetry traffic going through the proxy as other traffic does not require it because it is internal.
Describe the solution you'd like
We need to have additional configuration present allowing us to set the proxy host, port and type (http/https). Corresponding to the existing properties, this could be for example:
otel.exporter.otlp.[metrics|traces|logs].proxy.host
=<proxy hostname>
otel.exporter.otlp.[metrics|traces|logs].proxy.port
=<port number>
The text was updated successfully, but these errors were encountered: