The OpenTelemetry Java agent is a jar you attach at startup. It instruments Spring, servlet containers, JDBC, Kafka and the HTTP clients in the JVM, and exports traces, logs and metrics to Maple without a code change.
curl -L -o opentelemetry-javaagent.jar \
https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar # The key goes in the environment, not on the command line, where ps would show it
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_INGEST_KEY"
java \
-javaagent:opentelemetry-javaagent.jar \
-Dotel.service.name=my-java-app \
-Dotel.exporter.otlp.endpoint=https://ingest.maple.dev \
-Dotel.exporter.otlp.protocol=http/protobuf \
-Dotel.resource.attributes="deployment.environment.name=production" \
-jar app.jar export JAVA_TOOL_OPTIONS="-javaagent:/opt/opentelemetry-javaagent.jar"
export OTEL_SERVICE_NAME="my-java-app"
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.maple.dev"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_INGEST_KEY" This is the short path. The full Java guide covers the rest.
Organization in the EU region? Send to https://ingest.eu.maple.dev instead of https://ingest.maple.dev. An ingest key only works in its own region.
What you get
Each request is one root server span named after its method and route, such as GET /api/orders.
Query spans carry the statement and the database system. The database shows as a node on the service map.
The agent traces message producers and consumers alongside your HTTP and database spans.
Client spans propagate traceparent. An instrumented callee joins the same trace and draws an edge on the service map.
Log records are exported with the active trace and span id, so each line links to the request that wrote it.
The agent reports memory, garbage collection and thread counts, exported every 60 seconds.
Agent 2.x exports traces, logs and metrics over OTLP by default. There is no SDK code to write, and opentelemetry-api is the only dependency custom spans need.
A native image cannot load a Java agent. Use the OpenTelemetry Spring Boot starter there; it reads the same otel.* properties.
The agent appends /v1/traces itself. Never add :4317 or :4318. If nothing arrives, look for the agent's line in the startup log; without it, the -javaagent flag never reached the JVM.
SDK를 추가하고 OTLP 익스포터를 Maple로 향하게 하면 트레이스가 도착합니다.
maple.dev: OpenTelemetry 위의 옵저버빌리티