DataDog / dd-trace-java

Datadog APM client for Java
https://docs.datadoghq.com/tracing/languages/java
Apache License 2.0
567 stars 283 forks source link

JVM profiling in combination with existing OpenTelemetry tracing instrumentation #5226

Open jstaffans opened 1 year ago

jstaffans commented 1 year ago

Similar question to https://github.com/DataDog/dd-trace-java/issues/4507:

is it possible to use this library only for profiling and JVM metrics, rely on the OpenTelemetry Java SDK for tracing instrumentation and have everything happily coexist in Datadog APM?

richardstartin commented 1 year ago

Yes, it is possible - you can just enable the profiler and metrics and disable the tracer (-Ddd.profiler.enabled=true -Ddd.jmxfetch.enabled=true -Ddd.tracing.enabled=false and you will get profiling and metrics without tracing. The metrics doesn't depend on the tracer being active at all. Profiling will work, however, there are a number of advanced profiling features which rely on context propagated by the tracer, which don't currently work with OTel, such as:

It may be possible to make these features work with OTel in the future.