Auto-instrument a Java application with the OpenTelemetry Java agent and configure agent settings via system properties

domain: opentelemetry.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Download the opentelemetry-javaagent.jar from the GitHub releases page of the opentelemetry-java-instrumentation repo
  2. Attach the agent with -javaagent:/path/to/opentelemetry-javaagent.jar on the JVM command line or JAVA_TOOL_OPTIONS environment variable
  3. Set the OTLP endpoint with -Dotel.exporter.otlp.endpoint=http://collector:4317 and service name with -Dotel.service.name=my-service
  4. Suppress or disable specific auto-instrumentation libraries with -Dotel.instrumentation.<name>.enabled=false when a library causes conflicts
  5. Enable resource detection for cloud provider metadata by setting -Dotel.resource.providers.enabled=true

Known gotchas

Related routes

Auto-instrument a Node.js application with the OTel Node.js SDK and @opentelemetry/auto-instrumentations-node
opentelemetry.io · 5 steps · unrated
Manually create and nest spans with the OTel SDK to trace internal business logic beyond framework auto-instrumentation
opentelemetry.io · 6 steps · unrated
Instrument a browser application with the OpenTelemetry JavaScript SDK to emit traces for page loads and fetch requests
opentelemetry.io · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans