Note: Many application servers are Servlet compatible and are automatically covered by that instrumentation, such as Websphere, Weblogic, and JBoss.
Also, frameworks like Spring Boot (version 3) inherently work because they usually use a supported embedded application server, such as Tomcat, Jetty, or Netty.
Kafka Note: Datadog’s Kafka integration works with Kafka version 0.11+, which supports the Header API. This API is used to inject and extract trace context. If you are running a mixed version environment, the Kafka broker can incorrectly report the newer version of Kafka. This causes an issue when the tracer tries to inject headers that are not supported by the local producer. Additionally, older consumers are unable to consume the message because of the presence of headers. To prevent these issues, if you are running a mixed version Kafka environment with versions older than 0.11, disable context propagation with the environment variable: DD_KAFKA_CLIENT_PROPAGATION_ENABLED=false.
JMS Note: Datadog’s JMS integration automatically adds and reads message object properties x__dash__datadog__dash__trace__dash__id and x__dash__datadog__dash__parent__dash__id to maintain context propagation between consumer and producer services.
Camel Note: Distributed trace propagation over Camel routes is not supported.
Don’t see your desired networking framework? Datadog is continually adding additional support. Contact Datadog support if you need help.
GraalVM Native Image is a technology that allows you to compile Java applications into native executables. The Datadog Java tracer supports GraalVM Native Image. This allows you to compile your applications into native executables while still benefiting from the tracing capabilities offered by the library.
(Optional) Enable the profiler integration by adding the following argument:
-J-Ddd.profiling.enabled=true -–enable-monitoring=jfr.
For tracer versions before 1.39.1, when executing the generated native executable, ensure that DD_PROFILING_START_FORCE_FIRST=true is set as an environment variable.
To set up the Datadog Java tracer with Quarkus Native, follow these steps:
(Optional) Enable the profiler integration by adding the following argument:
-J-Ddd.profiling.enabled=true -–enable-monitoring=jfr.
For tracer versions before 1.39.1, when executing the generated native executable, ensure that DD_PROFILING_START_FORCE_FIRST=true is set as an environment variable.
To set up the Datadog Java tracer with Spring Native, follow these steps:
Alternatively, you can use the pack build command with --env BP_DATADOG_ENABLED=true option to enable the Datadog buildpack.
(Optional) Enable the profiler integration by setting the environment variable BP_NATIVE_IMAGE_BUILD_ARGUMENTS=’-J-Ddd.profiling.enabled=true -–enable-monitoring=jfr’.
For tracer versions before 1.39.1, when executing the generated native executable, ensure that DD_PROFILING_START_FORCE_FIRST=true is set as an environment variable.
Older native-image buildpack versions expose the following option: USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM.
When this option is false, exceptions like the following can occur:
Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
com.oracle.graal.pointsto.constraints.UnsupportedFeatureException:
No instances of datadog.trace.bootstrap.DatadogClassLoader are allowed in the image heap
as this class should be initialized at image runtime. To see how this object got
instantiated use --trace-object-instantiation=datadog.trace.bootstrap.DatadogClassLoader.
Solutions to this issue are:
Set USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM explicitly to true in the image env configuration,
Or upgrade the native-image buildpack to version 5.12.2 or later. The best way to do this is by upgrading the java-native-image buildpack to 8.13.0 or later.
Paketo buildpack for Datadog had a bug in older versions that materialized with the following error message:
disabling Datadog at launch time is unsupported for Node
ERROR: failed to launch: exec.d: failed to execute exec.d file at path '/layers
paketo-buildpacks_datadog/helper/exec.d/toggle': exit status 1
The solution to this issue is to upgrade to version 4.6.0 or later.
You might encounter initialization errors if your tracer configuration relies on Unix Domain Sockets (UDS), which are not supported in native images:
dd.trace 2024-12-30 08:34:43:306 +0000] [main] WARN datadog.trace.agent.tooling.nativeimage.TracerActivation - Problem activating datadog tracer
java.lang.NoClassDefFoundError: Could not initialize class jnr.unixsocket.UnixSocketChannel
The solution is to configure the Java tracer to use host-based communication (hostip or service mode), rather than socket-based communication (socket mode).