Auto-inject the OTel Java agent into any Java process via JAVA_TOOL_OPTIONS — the OTel equivalent of Dynatrace's LD_PRELOAD. No startup script changes needed. Downloads the agent JAR, sets system-wide env, and any JVM on the host picks it up automatically. Generic skill — works for any Java application (Spring Boot, Camel, webMethods, etc.). Battle-tested: "Picked up JAVA_TOOL_OPTIONS" confirmed on startup.
Inject the OTel Java agent into any Java process without modifying startup scripts or application code. This is the OTel equivalent of Dynatrace's LD_PRELOAD injection.
JAVA_TOOL_OPTIONS env var (system-wide)
→ JVM reads on startup (built-in feature)
→ Prepends -javaagent:/opt/otel/opentelemetry-javaagent.jar
→ OTel agent loads, auto-instruments the app
→ Sends OTLP to local collector on 127.0.0.1:4318
No startup script changes. No -javaagent flag to add manually. No application code changes.
install-otelcol-contrib)sudo ./scripts/setup-java-tool-options.sh
# Restart your Java app — it's now instrumented
-javaagent:/opt/otel/opentelemetry-javaagent.jar
-Dotel.javaagent.extensions=/opt/otel/extensions/otel-dsm-extension-1.0.jar
-Dloader.path=/opt/otel/extensions/
-Dotel.exporter.otlp.endpoint=http://127.0.0.1:4318
-Dotel.exporter.otlp.protocol=http/protobuf
-Dotel.logs.exporter=otlp
-Dotel.metrics.exporter=otlp
-Dotel.instrumentation.http.server.capture-request-headers=transaction_id
-Dotel.instrumentation.http.server.capture-response-headers=transaction_id
Extensions are optional — basic instrumentation works without them. Add when you need custom span attributes or DSM.
| Aspect | Dynatrace LD_PRELOAD | OTel JAVA_TOOL_OPTIONS | Datadog SSI |
|---|---|---|---|
| Mechanism | OS dynamic linker | JVM built-in env var | OS dynamic linker |
| Affects | ALL processes | Java only | ALL processes |
| Config file | /etc/ld.so.preload | /etc/profile.d/ + /etc/environment | /etc/ld.so.preload |
| Startup changes | None | None | None |
| App code changes | None | None | None |
| Multi-language | Yes | No (Java only) | Yes |
Picked up JAVA_TOOL_OPTIONS: -javaagent:/opt/otel/... confirmed on JVM startup[otel.javaagent] opentelemetry-javaagent - version: 2.26.1 confirmed127.0.0.1 not localhost in endpoint (IPv6 resolution issue)otel.service.name is NOT in JAVA_TOOL_OPTIONS — each app sets its own via OTEL_SERVICE_NAME env var or spring.application.namesudo ./scripts/remove-java-tool-options.sh
# Restart apps to stop the agent