Download the opentelemetry-javaagent.jar from the GitHub releases page of the opentelemetry-java-instrumentation repo
Attach the agent with -javaagent:/path/to/opentelemetry-javaagent.jar on the JVM command line or JAVA_TOOL_OPTIONS environment variable
Set the OTLP endpoint with -Dotel.exporter.otlp.endpoint=http://collector:4317 and service name with -Dotel.service.name=my-service
Suppress or disable specific auto-instrumentation libraries with -Dotel.instrumentation.<name>.enabled=false when a library causes conflicts
Enable resource detection for cloud provider metadata by setting -Dotel.resource.providers.enabled=true
Known gotchas
The Java agent instruments classloaders at startup; classes loaded after agent initialization (dynamic class loading frameworks) may not be instrumented
Some frameworks require additional configuration or extension jars because the bundled instrumentation only covers officially supported versions
Agent overhead varies by framework and traffic volume; always benchmark with a representative load before enabling in production
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp