If you’ve configured the profiler and don’t see profiles in the profile search page, turn on debug mode and open a support ticket with debug files and the following information:
Operating system type and version (for example, Linux Ubuntu 20.04)
Runtime type, version, and vendor (for example, Java OpenJDK 11 AdoptOpenJDK)
If the default setup overhead is not acceptable, you can use the profiler with minimal configuration settings. Minimal configuration has the following changes compared to the default:
Increases sampling threshold to 500ms for ThreadSleep, ThreadPark, and JavaMonitorWait events compared to 100ms default
If you want more granularity in your profiling data, you can specify the comprehensive configuration. Note that this approach will increase your profiler overhead at the cost of further granularity. Comprehensive configuration has the following changes compared to the default:
Reduces sampling threshold to 10ms for ThreadSleep, ThreadPark, and JavaMonitorWait events compared to 100ms default
On Java 15 and lower, the allocation profiler is turned off by default because it can overwhelm the profiler in allocation-heavy applications.
To enable the allocation profiler, start your application with the -Ddd.profiling.allocation.enabled=true JVM setting or the DD_PROFILING_ALLOCATION_ENABLED=true environment variable.
This feature requires at least Java 11.0.12, 15.0.4, 16.0.2, 17.0.3 or 18 and newer
To enable the heap profiler, start your application with the `-Ddd.profiling.heap.enabled=true` JVM setting or the `DD_PROFILING_HEAP_ENABLED=true` environment variable.
This feature requires at least Java 17.0.9 or newer and does not work with ZGC
To enable the heap histogram metrics, start your application with the -Ddd.profiling.heap.histogram.enabled=true JVM setting or the DD_PROFILING_HEAP_HISTOGRAM_ENABLED=true environment variable.
If your system properties contain sensitive information such as user names or passwords, turn off the system property event by creating a jfpoverride template file with jdk.InitialSystemProperty disabled:
If you are using the alpha feature of live heap profiling, you can tune the overhead by changing the percentage
of the tracked allocation samples.
# track only 10% of the allocation samplesjava -javaagent:dd-java-agent.jar -Ddd.profiling.enabled=true -Ddd.profiling.ddprof.liveheap.enabled=true -Ddd.profiling.ddprof.liveheap.sample_percent=10 -jar <YOUR_SERVICE>.jar <YOUR_SERVICE_FLAGS>
The Datadog exception profiler has a small footprint and overhead under normal conditions. If a lot of exceptions are created and thrown, it can cause significant overhead for the profiler. This can happen when you use exceptions for control flow. If you have an unusually high exception rate, turn off exception profiling temporarily until you fix the cause.
To disable exception profiling, start the tracer with the -Ddd.integration.throwables.enabled=false JVM setting.
Remember to turn this setting back on after you’ve returned to a more typical rate of exceptions.
Override templates let you specify profiling properties to override. However, the default settings are balanced for a good tradeoff between overhead and data density that cover most use cases. To use an override file, perform the following steps:
Create an override file in a directory accessible by dd-java-agent at service invocation:
touch dd-profiler-overrides.jfp
Add your desired overrides to the jfp file. For example, to disable allocation profiling and JVM system properties, your dd-profiler-overrides.jfp file would look like the following:
When running your application with dd-java-agent, your service invocation must point to the override file with -Ddd.profiling.jfr-template-override-file=</path/to/override.jfp>, for example: