You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/_edot-sdks/java/troubleshooting.md
+49-1
Original file line number
Diff line number
Diff line change
@@ -7,4 +7,52 @@ parent: EDOT Java
7
7
8
8
# Troubleshooting the EDOT Java Agent
9
9
10
-
TODO
10
+
The sections below are in the order you should follow, unless you have already identified the section you need.
11
+
12
+
This guide assumes you have tested the other components in the route from application+agent to Elastic Observability (eg collector or APM server, Elasticsearch, and Kibana) and that the problem has been isolated to the application+agent.
13
+
14
+
## General
15
+
16
+
Ensure you have set a service name (eg `-Dotel.service.name=Service1` or environment variable `OTEL_SERVICE_NAME` set to `Service1`) otherwise by default the data (traces, metrics, logs) will be sent to `unknown_service_java` - you may be getting data but it may all be under that service
17
+
18
+
## Connectivity to endpoint
19
+
20
+
Check _from_ the host/VM/pod/container/image running the app, that connectivity is available to the APM server or collector. The examples here use a default URL, which you should replace with the endpoint you are using:
21
+
22
+
- OpenTelemetry or EDOT collector without authentication: `curl -i http://127.0.0.1:4318/v1/traces -X POST -d '{}' -H content-type:application/json`
23
+
- APM server without authentication: `curl --verbose -X GET http://127.0.0.1:8200`
24
+
- APM server with secret token authentication: `curl -X POST http://127.0.0.1:8200/ -H "Authorization: Bearer <secret_token>"`
25
+
- APM server with API key authentication: `curl -X POST http://127.0.0.1:8200/ -H "Authorization: ApiKey <api_key>"`
1. Starting the application with no agent and seeing if the issue is not present, but then the issue is again present when restarting with the agent
48
+
2. Check end-to-end connectivity without the agent by running one or more of the example apps in https://github.com/elastic/elastic-otel-java/blob/main/examples/troubleshooting/README.md . These use the OpenTelemetry SDK rather than the auto-instrumentation, ie there is no agent present, and create traces, metrics and logs, so provide confirmation that the issue is specific to the agent or can otherwise identify that the issue is something else
49
+
50
+
## Agent DEBUG
51
+
52
+
Debug output is enabled with `-Dotel.javaagent.debug=true` or environment variable `OTEL_JAVAAGENT_DEBUG` to `true`.
53
+
54
+
Once debug is enabled, look for:
55
+
- Errors and exceptions
56
+
- For the expected traces or metrics - or lack of them (maybe the [technology isn't instrumented?](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md))
0 commit comments