I've been trying to run the datadog and opentelemetry and datadog java agents together. The command that I'm using is
java -Xmx4096m -Xms4096m -XX:-UseAESIntrinsics -DdomainName=domain1 -javaagent:/tmp/opentelemetry-javaagent.jar -Dotel.logs.exporter=otlp -Dotel.semconv-stability.opt-in=http -Dotel.instrumentation.micrometer.base-time-unit=s -Dotel.exporter.otlp.endpoint=http://localhost:4317 -Dotel.exporter.otlp.protocol=grpc -Dotel.service.name=myapp -javaagent:/tmp/dd-java-agent.jar -Ddd.service.name=myapp -Ddd.service.mapping=jms:myapp -Ddd.trace.split-by-tags=aws.service myapp.jar
The app starts but after a few minutes I get the error
An unexpected error occurred in a scheduled task
java.lang.NoClassDefFoundError: datadog/trace/instrumentation/springscheduling/SpringSchedulingInstrumentation
When I run the app with just one agent (it doesn't matter which) it works. There are no dependencies in the code of the jar
Run the app and not see that error