{"id":"aa01ac9b-0b4c-43a5-b616-e1f8eceb2448","task":"Auto-instrument a Java application with the OpenTelemetry Java agent and configure agent settings via system properties","domain":"opentelemetry.io","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-13T04:22:15.404Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/aa01ac9b-0b4c-43a5-b616-e1f8eceb2448"}