Agent-skills observability-edot-java-migrate
install
source · Clone the upstream repo
git clone https://github.com/elastic/agent-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/elastic/agent-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/observability/edot-java-migrate" ~/.claude/skills/elastic-agent-skills-observability-edot-java-migrate && rm -rf "$T"
manifest:
skills/observability/edot-java-migrate/SKILL.mdsource content
EDOT Java Migration
Read the migration guide before making changes:
Guidelines
- Remove ALL classic APM references:
,elastic-apm-agent.jar
, allelasticapm.properties
env vars, and anyELASTIC_APM_*
Maven/Gradle dependenciesco.elastic.apm - Use
(download from Maven Central, not a Maven/Gradle compile dependency)elastic-otel-javaagent.jar - Attach via
or-javaagent:/path/to/elastic-otel-javaagent.jar
— without this the agent does nothingJAVA_TOOL_OPTIONS="-javaagent:/path/to/elastic-otel-javaagent.jar" - Set exactly three required environment variables:
(replacesOTEL_SERVICE_NAME
)ELASTIC_APM_SERVICE_NAME
— must be the managed OTLP endpoint or EDOT Collector URL. Do NOT reuse the oldOTEL_EXPORTER_OTLP_ENDPOINT
value. Never use an APM Server URL (noELASTIC_APM_SERVER_URL
, noapm-server
, no:8200
)/intake/v2/events
—OTEL_EXPORTER_OTLP_HEADERS
or"Authorization=ApiKey <key>"
(replaces"Authorization=Bearer <token>"
/ELASTIC_APM_SECRET_TOKEN
)API_KEY
- Do NOT set
,OTEL_TRACES_EXPORTER
, orOTEL_METRICS_EXPORTER
— the defaults are already correctOTEL_LOGS_EXPORTER - Never run both classic Elastic APM agent and EDOT agent on the same JVM
Examples
See the EDOT Java migration guide for complete examples.