
Observability Edot Java Instrument
Attach Elastic's OpenTelemetry Java agent to a service so traces, metrics, and logs export to Elastic without a legacy APM SDK.
Overview
observability-edot-java-instrument is an agent skill most often used in Operate (also Build backend) that adds Elastic EDOT Java auto-instrumentation via the OpenTelemetry javaagent.
Install
npx skills add https://github.com/elastic/agent-skills --skill observability-edot-java-instrumentWhat is this skill?
- Uses elastic-otel-javaagent.jar via -javaagent or JAVA_TOOL_OPTIONS—not as a compile dependency
- Requires OTEL_SERVICE_NAME, OTLP endpoint (managed OTLP or EDOT Collector), and Authorization headers only
- Explicit guardrails: never point exporters at APM Server :8200 intake URLs
- Zero-code instrumentation aligned with OpenTelemetry Java agent docs and Elastic EDOT references
- For Java services with no existing APM agent
- 3 required environment variables (OTEL_SERVICE_NAME, OTLP endpoint, OTLP headers)
Adoption & trust: 937 installs on skills.sh; 502 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Java API runs blind in production because you skipped APM and do not know the correct Elastic OTLP endpoint setup.
Who is it for?
Indie backend devs shipping Java services to Elastic Cloud or EDOT Collector who want automatic traces without SDK refactors.
Skip if: Apps already instrumented with a conflicting APM agent you must keep, or non-Java runtimes needing different Elastic skills.
When should I use this skill?
Adding observability to a Java service that has no existing APM agent.
What do I get? / Deliverables
Your JVM starts with the EDOT agent and exports service telemetry to Elastic using the required OTLP env configuration.
- javaagent launch configuration
- OTEL_SERVICE_NAME and OTLP exporter environment variable set
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Observability pays off once services run in production; Operate is the primary home for instrumentation that feeds monitoring. Monitoring subphase covers wiring exporters, service names, and collectors so you can see latency and errors in Elastic.
Where it fits
Before first deploy, add JAVA_TOOL_OPTIONS javaagent line in your container image for staging Elastic.
Production lacks traces; fix OTLP endpoint and headers so latency appears in Elastic observability.
Validate that automatic metrics export works under load test without custom Micrometer wiring.
How it compares
Procedure skill for javaagent attach and env vars—not a Terraform pack and not a dashboard UI skill.
Common Questions / FAQ
Who is observability-edot-java-instrument for?
Solo builders and small teams running Java services on Elastic observability who need OTLP-based auto-instrumentation without baking SDKs into the codebase.
When should I use observability-edot-java-instrument?
Use it in Operate when enabling monitoring for a deployed JVM, and in Build backend integration when you first wire staging to Elastic before go-live.
Is observability-edot-java-instrument safe to install?
Review the Security Audits panel on this page; configuring OTLP means handling API keys in environment variables—never commit secrets and validate jar sources from Maven Central.
SKILL.md
READMESKILL.md - Observability Edot Java Instrument
# EDOT Java Instrumentation Read the setup guide before making changes: - [EDOT Java setup](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/setup) - [OpenTelemetry Java agent](https://opentelemetry.io/docs/zero-code/java/agent/) - [EDOT Java configuration](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/configuration) ## Guidelines 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` - `OTEL_EXPORTER_OTLP_ENDPOINT` — must be the **managed OTLP endpoint** or **EDOT Collector** URL. 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>"` 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 setup guide](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/setup) for complete Dockerfile and docker-compose examples.