In Datadog, you can set up a threshold alert to automatically get notified when average heap usage has crossed 80 percent of maximum heap size. Containers AWS Lambda Other Environments with the is_jmx option set to true in the configuration file. Add the Datadog Tracing Library for your environment and language, whether you are tracing a proxy or tracing across AWS Lambda functions and hosts, using automatic instrumentation, dd-trace-api, or OpenTelemetry. Generate metrics with 15-month retention from all ingested spans to create and monitor key business and performance indicators over time. Analyze Java metrics and stack traces in context Leverage Datadog APM to monitor and troubleshoot Java performance issues. Replace docker with nerdctl for the containerd runtime, or podman for the Podman runtime. Below, well explore two noteworthy logs in detail: If your heap is under pressure, and garbage collection isnt able to recover memory quickly enough to keep up with your applications needs, you may see To-space exhausted appear in your logs. Datadog APMs detailed service-level overviews display key performance indicatorsrequest throughput, latency, and errorsthat you can correlate with JVM runtime metrics. If your applications heap usage reaches the maximum size but it still requires more memory, it will generate an OutOfMemoryError exception. Edit jmx.d/conf.yaml in the conf.d/ folder at the root of your Agents configuration directory. The -verbose:gc flag configures the JVM to log these details about each garbage collection process. OpenTracing API: , Sensitive Data Scanner , Agent Integration Developer Tool , DD_TRACE_AGENT_URL=http://custom-hostname:1234, DD_TRACE_AGENT_URL=unix:///var/run/datadog/apm.socket, java -javaagent:.jar -jar .jar, wget -O dd-java-agent.jar https://dtdg.co/latest-java-tracer, java -javaagent:/path/to/dd-java-agent.jar -Ddd.profiling.enabled=true -XX:FlightRecorderOptions=stackdepth=256 -Ddd.logs.injection=true -Ddd.service=my-app -Ddd.env=staging -jar path/to/your/app.jar -Ddd.version=1.0, JAVA_OPTS=-javaagent:/path/to/dd-java-agent.jar, CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/dd-java-agent.jar", set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:"c:\path\to\dd-java-agent.jar", JAVA_OPTS="$JAVA_OPTS -javaagent:/path/to/dd-java-agent.jar", set "JAVA_OPTS=%JAVA_OPTS% -javaagent:X:/path/to/dd-java-agent.jar",