
Observability Edot Java Migrate
Migrate a Java service from the classic Elastic APM Java agent to the EDOT OpenTelemetry Java agent without leaving stale ELASTIC_APM_* config behind.
Overview
observability-edot-java-migrate is an agent skill for the Operate phase that guides removal of classic Elastic APM Java agent setup and replacement with EDOT elastic-otel-javaagent.jar and OTEL environment variables.
Install
npx skills add https://github.com/elastic/agent-skills --skill observability-edot-java-migrateWhat is this skill?
- Checklist to remove elastic-apm-agent.jar, elasticapm.properties, ELASTIC_APM_* env vars, and co.elastic.apm dependencie
- Requires elastic-otel-javaagent.jar via -javaagent or JAVA_TOOL_OPTIONS—compile-time Maven dep alone does nothing
- Maps ELASTIC_APM_SERVICE_NAME to OTEL_SERVICE_NAME plus managed OTLP endpoint or EDOT Collector URL (not legacy APM serv
- Points to Elastic migration, setup, and configuration docs before editing deployment manifests
- Exactly three required OTEL environment variables called out after migration (service name, OTLP endpoint, plus doc-driv
Adoption & trust: 930 installs on skills.sh; 502 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Java app still runs the classic Elastic APM agent and you risk broken telemetry or mixed config if you partial-migrate to OpenTelemetry EDOT.
Who is it for?
Indie operators on Elastic observability who must cut over a JVM deployment from elastic-apm-agent to elastic-otel-javaagent with doc-aligned steps.
Skip if: Greenfield apps with no Elastic APM legacy, non-Java runtimes, or teams not sending traces to Elastic-managed OTLP or an EDOT Collector.
When should I use this skill?
Use when switching from elastic-apm-agent.jar to elastic-otel-javaagent.jar on a Java application.
What do I get? / Deliverables
Classic APM references are removed, the OTEL javaagent is attached correctly, and required OTEL_SERVICE_NAME and OTLP endpoint variables point at Elastic’s managed OTLP or EDOT Collector.
- Updated JVM -javaagent attachment
- Removed legacy APM config and dependencies
- OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT configuration
Recommended Skills
Journey fit
Observability agent swaps affect how production telemetry is collected and exported—canonical shelf is Operate monitoring. Monitoring subphase is where APM/OTEL attachment, service naming, and OTLP endpoints are configured for running workloads.
How it compares
A focused migration runbook for Elastic’s OTEL javaagent—not a generic OpenTelemetry instrumentation tutorial or application-code refactor skill.
Common Questions / FAQ
Who is observability-edot-java-migrate for?
Solo builders and small teams operating Java services already on classic Elastic APM who are standardizing on the EDOT Java agent.
When should I use observability-edot-java-migrate?
In Operate when you are changing JVM startup flags or container env for production or staging—especially when SKILL.md says you are switching from elastic-apm-agent.jar to elastic-otel-javaagent.jar.
Is observability-edot-java-migrate safe to install?
Treat it as vendor guidance that touches production secrets and endpoints; review the Security Audits panel on this Prism page and validate changes in a non-prod environment first.
SKILL.md
READMESKILL.md - Observability Edot Java Migrate
# EDOT Java Migration Read the migration guide before making changes: - [Migration guide](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/migration) - [EDOT Java setup](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/setup) - [EDOT Java configuration](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/configuration) ## Guidelines 1. Remove ALL classic APM references: `elastic-apm-agent.jar`, `elasticapm.properties`, all `ELASTIC_APM_*` env vars, and any `co.elastic.apm` Maven/Gradle dependencies 1. Use `elastic-otel-javaagent.jar` (download from [Maven Central](https://mvnrepository.com/artifact/co.elastic.otel/elastic-otel-javaagent/latest), not a Maven/Gradle compile dependency) 1. Attach via `-javaagent:/path/to/elastic-otel-javaagent.jar` or `JAVA_TOOL_OPTIONS="-javaagent:/path/to/elastic-otel-javaagent.jar"` — without this the agent does nothing 1. Set exactly three required environment variables: - `OTEL_SERVICE_NAME` (replaces `ELASTIC_APM_SERVICE_NAME`) - `OTEL_EXPORTER_OTLP_ENDPOINT` — must be the **managed OTLP endpoint** or **EDOT Collector** URL. Do NOT reuse the old `ELASTIC_APM_SERVER_URL` value. Never use an APM Server URL (no `apm-server`, no `:8200`, no `/intake/v2/events`) - `OTEL_EXPORTER_OTLP_HEADERS` — `"Authorization=ApiKey <key>"` or `"Authorization=Bearer <token>"` (replaces `ELASTIC_APM_SECRET_TOKEN` / `API_KEY`) 1. Do NOT set `OTEL_TRACES_EXPORTER`, `OTEL_METRICS_EXPORTER`, or `OTEL_LOGS_EXPORTER` — the defaults are already correct 1. Never run both classic Elastic APM agent and EDOT agent on the same JVM ## Examples See the [EDOT Java migration guide](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/migration) for complete examples.