observability-edot-java-instrument

Instrument Java applications with EDOT to generate traces, metrics, and logs.

31|4|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/elastic/cursor-plugins --skill observability-edot-java-instrument
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability-edot-java-instrument
Source: https://github.com/elastic/cursor-plugins/tree/main/elastic/skills/observability/edot-java-instrument
Command: npx skills add https://github.com/elastic/cursor-plugins --skill observability-edot-java-instrument

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Instrument Java applications with EDOT to automatically generate traces, metrics, and logs. It targets Java services with no existing APM agent and helps you add observable telemetry with minimal configuration.

Core Features & Use Cases

  • Automatic instrumentation for traces, metrics, and logs with the EDOT Java agent.
  • Simple onboarding for Java services that lack an APM agent, enabling production-grade observability.
  • Use case: you want end-to-end visibility over a Java microservice without modifying business logic.

Quick Start

Attach the elastic-otel-javaagent.jar to your JVM with -javaagent:/path/to/elastic-otel-javaagent.jar and run your Java service to begin automatic tracing, metrics, and logs collection.

Frequently Asked Questions about observability-edot-java-instrument

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add OpenTelemetry automatic tracing to a Java application?

To add OpenTelemetry automatic tracing to a Java application, attach the EDOT Java agent via the -javaagent:/path/to/elastic-otel-javaagent.jar JVM argument to automatically generate traces, metrics, and logs without modifying business logic.

What environment variables do I need to configure for EDOT Java instrumentation?

You need to configure exactly three environment variables for EDOT Java instrumentation: OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT, and OTEL_EXPORTER_OTLP_HEADERS to successfully export telemetry data.

Can I run the EDOT Java agent alongside a classic Elastic APM agent?

No, you cannot run the EDOT Java agent simultaneously with a classic Elastic APM agent. You must avoid running both together to prevent telemetry collection conflicts and ensure proper observability data generation.

What happens if I set OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER, or OTEL_LOGS_EXPORTER with the EDOT Java agent?

You should not set OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER, or OTEL_LOGS_EXPORTER when using the EDOT Java agent. Avoiding these configurations ensures the automatic instrumentation defaults function correctly.

Is automatic Java instrumentation suitable for microservices with no existing APM agent?

Yes, automatic Java instrumentation targets Java services with no existing APM agent. It provides simple onboarding and enables production-grade observability with minimal configuration for end-to-end visibility over microservices.

Does the EDOT Java agent require code modifications to collect metrics and logs?

No, the EDOT Java agent requires no code modifications to collect metrics and logs. It attaches directly to the JVM to automatically generate traces, metrics, and logs without altering your business logic.