|
| 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) |
0 commit comments