Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions docs/reference/edot-collector/config/proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
navigation_title: Proxy settings
description: Configuration of the EDOT Collector's proxy settings.
applies_to:
stack:
serverless:
observability:
product:
edot_collector: ga
products:
- id: cloud-serverless
- id: observability
- id: edot-collector
---

# Configure proxy settings for EDOT components

When running Elastic Distributions of OpenTelemetry (EDOT) in environments that require outbound traffic to go through a proxy, you must explicitly configure proxy settings.

You may need to configure a proxy if:

- Your app is deployed behind a corporate proxy or firewall.
- Your telemetry is sent to Elastic APM in Elastic Cloud or another hosted destination.
- Network errors such as `Connection timed out` or `SSL handshake failed` appear in logs.

## Available proxy variables

| Variable | Description |
|--------------|---------------------------------------------|
| HTTP_PROXY | URL of the proxy server for HTTP requests |
| HTTPS_PROXY | URL of the proxy server for HTTPS requests |
| NO_PROXY | Comma-separated list of hosts to exclude |

## Configure proxy settings for the EDOT Collector

Most EDOT components honor common proxy environment variables. The following examples show how to configure them:

::::{tab-set}

:::{tab-item} Docker run
```bash
docker run -e HTTP_PROXY=http://<proxy.address>:<port> \
-e HTTPS_PROXY=http://<proxy.address>:<port> \
otel/opentelemetry-collector:latest
```
:::

:::{tab-item} Docker compose
```yaml
services:
edotcollector:
environment:
- HTTP_PROXY=http://<proxy.address>:<port>
- HTTPS_PROXY=http://<proxy.address>:<port>
```
:::

:::{tab-item} Kubernetes pod manifest
```yaml
env:
- name: HTTP_PROXY
value: '<proxy.address>:<port>'
- name: HTTPS_PROXY
value: '<proxy.address>:<port>'
```
:::

:::{tab-item} systemmd [Service] unit file
```
[Service]
Environment="HTTP_PROXY=http://<proxy.address>:<port>"
Environment="HTTPS_PROXY=http://<proxy.address>:<port>"
Environment="NO_PROXY=<address1>,<address2>"
```
:::

::::

:::{{note}}
For the Collector, proxy support applies to all exporters, including those using gRPC. No special configuration is needed beyond the environment variables.
:::

## Proxy settings for EDOT SDKs

With the exception of Java SDK, EDOT SDKs use the `HTTP_PROXY / HTTPS_PROXY` settings from environment variables and require no extra configuration.

You can export environment variables like this:

```
export HTTP_PROXY=http://<proxy.address>:<port>
export HTTPS_PROXY=http://<proxy.address>:<port>
```

### Java SDK

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](../../troubleshoot/ingest/opentelemetry/edot-sdks/java/proxy-issues.md) for more information.

Check failure on line 96 in docs/reference/edot-collector/config/proxy.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

`../../troubleshoot/ingest/opentelemetry/edot-sdks/java/proxy-issues.md` does not exist. resolved to `/github/workspace/docs/reference/troubleshoot/ingest/opentelemetry/edot-sdks/java/proxy-issues.md

## Resources

[Proxy support - upstream documentation](https://opentelemetry.io/docs/collector/configuration/#proxy-support)
1 change: 1 addition & 0 deletions docs/reference/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ toc:
- file: edot-collector/config/default-config-k8s.md
- file: edot-collector/config/configure-logs-collection.md
- file: edot-collector/config/configure-metrics-collection.md
- file: edot-collector/config/proxy.md
- file: edot-collector/customization.md
children:
- file: edot-collector/components.md
Expand Down
Loading