JVM profiling in combination with existing OpenTelemetry tracing instrumentation
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?
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:
- code hotspots
- endpoint profiling
- labelling of profiling samples with span attributes
- currently unannounced profiling features
It may be possible to make these features work with OTel in the future.
Is the above still the case, or will advanced profiling features now work with OTel instrumentation?