observability-edot-java-instrument
Instrument a Java application with the Elastic Distribution of OpenTelemetry (EDOT) Java agent for automatic tracing, metrics, and logs. Use when adding observability to a Java service that has no existing APM agent.
How do I install this agent skill?
npx skills add https://github.com/elastic/agent-skills --skill observability-edot-java-instrumentIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides instructions for instrumenting Java applications with the Elastic Distribution of OpenTelemetry (EDOT). It contains standard setup guidelines and links to official documentation. No security issues were detected.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
1/1 file flagged
What does this agent skill do?
EDOT Java Instrumentation
Read the setup guide before making changes:
Guidelines
- Use
elastic-otel-javaagent.jar(download from Maven Central, not a Maven/Gradle compile dependency) - Attach via
-javaagent:/path/to/elastic-otel-javaagent.jarorJAVA_TOOL_OPTIONS="-javaagent:/path/to/elastic-otel-javaagent.jar"— without this the agent does nothing - Set exactly three required environment variables:
OTEL_SERVICE_NAMEOTEL_EXPORTER_OTLP_ENDPOINT— must be the managed OTLP endpoint or EDOT Collector URL. Never use an APM Server URL (noapm-server, no:8200, no/intake/v2/events)OTEL_EXPORTER_OTLP_HEADERS—"Authorization=ApiKey <key>"or"Authorization=Bearer <token>"
- Do NOT set
OTEL_TRACES_EXPORTER,OTEL_METRICS_EXPORTER, orOTEL_LOGS_EXPORTER— the defaults are already correct - Never run both classic Elastic APM agent and EDOT agent on the same JVM
Examples
See the EDOT Java setup guide for complete Dockerfile and docker-compose examples.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/elastic/agent-skills/observability-edot-java-instrument">View observability-edot-java-instrument on skillZs</a>