Skip to content

Commit 464e6b3

Browse files
Add proxy config guide for EDOT (#354)
* Add proxy setting guide for EDOT * Update cross-repo link * Update the Collector proxy guide and create a new SDK proxy guide * Add page to toc
1 parent db9847d commit 464e6b3

File tree

3 files changed

+136
-1
lines changed

3 files changed

+136
-1
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
navigation_title: Proxy settings
3+
description: Configuration of the EDOT Collector's proxy settings.
4+
applies_to:
5+
stack:
6+
serverless:
7+
observability:
8+
product:
9+
edot_collector: ga
10+
products:
11+
- id: cloud-serverless
12+
- id: observability
13+
- id: edot-collector
14+
---
15+
16+
# Configure proxy settings for EDOT components
17+
18+
When running Elastic Distributions of OpenTelemetry (EDOT) in environments that require outbound traffic to go through a proxy, you must explicitly configure proxy settings.
19+
20+
You may need to configure a proxy if:
21+
22+
- Your app is deployed behind a corporate proxy or firewall.
23+
- Your telemetry is sent to Elastic APM in Elastic Cloud or another hosted destination.
24+
- Network errors such as `Connection timed out` or `SSL handshake failed` appear in logs.
25+
26+
## Available proxy variables
27+
28+
| Variable | Description |
29+
|--------------|---------------------------------------------|
30+
| HTTP_PROXY | URL of the proxy server for HTTP requests |
31+
| HTTPS_PROXY | URL of the proxy server for HTTPS requests |
32+
| NO_PROXY | Comma-separated list of hosts to exclude |
33+
34+
## Configure proxy settings for the EDOT Collector
35+
36+
Most EDOT components honor common proxy environment variables. The following examples show how to configure them:
37+
38+
::::{tab-set}
39+
40+
:::{tab-item} Docker run
41+
```bash
42+
docker run -e HTTP_PROXY=http://<proxy.address>:<port> \
43+
-e HTTPS_PROXY=http://<proxy.address>:<port> \
44+
otel/opentelemetry-collector:latest
45+
```
46+
:::
47+
48+
:::{tab-item} Docker compose
49+
```yaml
50+
services:
51+
edotcollector:
52+
environment:
53+
- HTTP_PROXY=http://<proxy.address>:<port>
54+
- HTTPS_PROXY=http://<proxy.address>:<port>
55+
```
56+
:::
57+
58+
:::{tab-item} Kubernetes pod manifest
59+
```yaml
60+
env:
61+
- name: HTTP_PROXY
62+
value: '<proxy.address>:<port>'
63+
- name: HTTPS_PROXY
64+
value: '<proxy.address>:<port>'
65+
```
66+
:::
67+
68+
:::{tab-item} systemmd [Service] unit file
69+
```
70+
[Service]
71+
Environment="HTTP_PROXY=http://<proxy.address>:<port>"
72+
Environment="HTTPS_PROXY=http://<proxy.address>:<port>"
73+
Environment="NO_PROXY=<address1>,<address2>"
74+
```
75+
:::
76+
77+
::::
78+
79+
:::{{note}}
80+
For the EDOT Collector, proxy support applies to all exporters, including those using gRPC. No special configuration is needed beyond the environment variables.
81+
82+
If you're using an SDK that doesn't support proxy variables directly, consider routing telemetry through an EDOT Collector configured with proxy settings. This ensures consistent proxy handling. For more information, refer to [Proxy settings for EDOT SDKs](../../edot-sdks/proxy.md).
83+
:::
84+
85+
86+
## Resources
87+
88+
[Proxy support - upstream documentation](https://opentelemetry.io/docs/collector/configuration/#proxy-support)

docs/reference/edot-sdks/proxy.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
navigation_title: Proxy settings
3+
description: Configuration of the EDOT SDKs proxy settings.
4+
applies_to:
5+
stack:
6+
serverless:
7+
observability:
8+
product:
9+
edot_collector: ga
10+
products:
11+
- id: cloud-serverless
12+
- id: observability
13+
- id: edot-collector
14+
---
15+
16+
# Proxy settings for EDOT SDKs
17+
18+
EDOT SDKs generally use the standard proxy environment variables. However, there are exceptions and limitations depending on the language and exporter type.
19+
20+
## Python SDK
21+
22+
The Python SDK honors `HTTP_PROXY` and `HTTPS_PROXY` only when using the `http/protobuf` exporter.
23+
24+
If you use the default gRPC-based exporter, proxy settings are ignored. To enable proxy support, you can either:
25+
26+
* Switch to the `http/protobuf` exporter, which supports standard proxy environment variables.
27+
28+
* Route telemetry through a local EDOT Collector configured with proxy settings.
29+
30+
## Node.js SDK
31+
32+
The Node.js SDK does not currently support `HTTP_PROXY`, `HTTPS_PROXY`, or `NO_PROXY` by default. You can route telemetry through an EDOT Collector.
33+
34+
## Java SDK
35+
36+
If you’re using Java SDK, you must configure Java system properties using the Java Virtual Machine (JVM). Refer to [Troubleshooting Java SDK proxy issues](docs-content://troubleshoot/ingest/opentelemetry/edot-sdks/java/proxy-issues.md) for more information.
37+
38+
## Other SDKs
39+
40+
Other EDOT SDKs honor standard proxy environment variables with no additional setup required. For example:
41+
42+
```
43+
export HTTP_PROXY=http://<proxy.address>:<port>
44+
export HTTPS_PROXY=http://<proxy.address>:<port>
45+
```

docs/reference/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ toc:
5151
- file: edot-collector/config/default-config-k8s.md
5252
- file: edot-collector/config/configure-logs-collection.md
5353
- file: edot-collector/config/configure-metrics-collection.md
54+
- file: edot-collector/config/proxy.md
5455
- file: edot-collector/customization.md
5556
children:
5657
- file: edot-collector/components.md
@@ -124,5 +125,6 @@ toc:
124125
- file: edot-sdks/python/supported-technologies.md
125126
- file: edot-sdks/python/migration.md
126127
- file: edot-sdks/python/overhead.md
128+
- file: edot-sdks/proxy.md
127129
- file: motlp.md
128-
- file: central-configuration.md
130+
- file: central-configuration.md

0 commit comments

Comments
 (0)