Skip to content

Commit 9293932

Browse files
Document proxy configuration for Java SDK (elastic#2100)
This PR adds a troubleshooting guide to help users resolve proxy issues when using EDOT Java SDK. The guide explains that the Java SDK requires explicit JVM proxy config.
1 parent 9a2f0f3 commit 9293932

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
navigation_title: Proxy issues
3+
description: Troubleshooting guide for the EDOT Java SDK, covering proxy issues.
4+
applies_to:
5+
stack:
6+
serverless:
7+
observability:
8+
product:
9+
edot_java: ga
10+
products:
11+
- id: cloud-serverless
12+
- id: observability
13+
- id: edot-sdk
14+
---
15+
16+
# Proxy issues with EDOT Java SDK
17+
18+
If your Java SDK sends telemetry but fails to communicate with the APM server, the issue might be due to missing or misconfigured proxy settings, which are required for outbound HTTP/S communication in some environments.
19+
20+
## Symptoms
21+
22+
These symptoms typically indicate that your Java SDK is experiencing a proxy issue:
23+
24+
* Telemetry data is not received in Elastic APM after instrumenting the app.
25+
* Logs show errors like `Connection timed out`, `TLS handshake failure`, or other network-related issues when connecting to Elastic APM.
26+
27+
## Resolution
28+
29+
Set standard Java system properties to configure proxy settings.
30+
31+
Configure the following JVM system properties to enable outbound HTTP/HTTPS communication through a proxy:
32+
33+
```bash
34+
java \
35+
-Dhttp.proxyHost=proxy.example.com \
36+
-Dhttp.proxyPort=8080 \
37+
-Dhttps.proxyHost=proxy.example.com \
38+
-Dhttps.proxyPort=8080 \
39+
```
40+
41+
## Best practices
42+
43+
You can test end-to-end connectivity to validate proxy routing. To confirm that your application or collector can reach the endpoint through the proxy, use `curl` with the `--proxy` option:
44+
45+
```bash
46+
curl --proxy http://proxy.example.com:8080 https://example.elastic.co
47+
```
48+
49+
If the proxy is working, you'll get a valid response. If not, common errors include:
50+
51+
* `Connection timed out`
52+
* `Could not resolve host`
53+
* `Proxy CONNECT aborted`
54+
55+
## Resources
56+
57+
* [Java networking and proxies](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html)
58+
* [Java agent configuration - upstream documentation](https://opentelemetry.io/docs/zero-code/java/agent/configuration/)

troubleshoot/ingest/opentelemetry/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ toc:
1010
children:
1111
- file: edot-sdks/dotnet/index.md
1212
- file: edot-sdks/java/index.md
13+
children:
14+
- file: edot-sdks/java/proxy-issues.md
1315
- file: edot-sdks/nodejs/index.md
1416
- file: edot-sdks/php/index.md
1517
- file: edot-sdks/python/index.md

0 commit comments

Comments
 (0)