diff --git a/content/en/profiler/enabling/dotnet.md b/content/en/profiler/enabling/dotnet.md index fe260f56de0..acde484186e 100644 --- a/content/en/profiler/enabling/dotnet.md +++ b/content/en/profiler/enabling/dotnet.md @@ -76,7 +76,7 @@ The following profiling features are available in the following minimum versions - Allocations and Live Heap profiling are available in .NET 10. For other previous versions of .NET, the statistical distribution of allocations sampling might not be accurate, so expect larger objects to be represented more often - Continuous Profiler is not supported for AWS Lambda. - Continuous Profiler does not support ARM64. - +
Note: Unlike APM, Continuous Profiler is not activated by default when the APM package is installed. You must explicitly enable it for the applications you want to profile.
@@ -100,11 +100,11 @@ You can install the Datadog .NET Profiler machine-wide so that any services on t 1. With [Single Step APM Instrumentation][1], there is nothing else to install. Go to [Enabling the Profiler](#enabling-the-profiler) to see how to activate the profiler for an application.
- Note: If APM was already manually installed, you must uninstall it by removing the following environment variables:
+ Note: If APM was already manually installed, you must uninstall it by removing the following environment variables:
- CORECLR_ENABLE_PROFILING
- CORECLR_PROFILER
- CORECLR_PROFILER_PATH
- - The value that points to Datadog.Linux.ApiWrapper.x64.so in LD_PRELOAD

+ - The value that points to Datadog.Linux.ApiWrapper.x64.so in LD_PRELOAD

For example, if you are setting these environment variables in your dockerfile for a service, you should remove them to avoid conflicts with Single Step Instrumentation. If these environment variables are still set, the corresponding previously installed version is silently used instead of the one installed with Single Step Instrumentation.
@@ -471,7 +471,7 @@ You can configure the profiler using the following environment variables. Note t | `DD_PROFILING_HEAP_ENABLED` | Boolean | If set to `true`, enables Live Heap profiling (in Preview). Defaults to `false`. | | `DD_PROFILING_GC_ENABLED` | Boolean | If set to `false`, disables Garbage Collection profiling used in Timeline user interface. Defaults to `true`. | | `DD_PROFILING_HTTP_ENABLED` | Boolean | If set to `true`, enables outgoing HTTP request profiling used in Timeline user interface. Defaults to `false`. | -| `DD_PROFILING_HEAPSNAPSHOT_ENABLED` | Boolean | If set to `true`, enables the regular generation of a heap snapshot in case of memory consumption increase. This is used in the Memory Leak user interface. Defaults to `false`. | +| `DD_PROFILING_HEAPSNAPSHOT_ENABLED` | Boolean | If set to `true`, enables the regular generation of a heap snapshot in case of memory consumption increase. This is used in the [Memory Leak user interface][15]. Defaults to `false`. |
@@ -495,3 +495,4 @@ The [Getting Started with Profiler][4] guide takes a sample service with a perfo [12]: /profiler/connect_traces_and_profiles/#identify-code-hotspots-in-slow-traces [13]: /profiler/connect_traces_and_profiles/#break-down-code-performance-by-api-endpoints [14]: /profiler/enabling/supported_versions/ +[15]: /profiler/guide/solve-memory-leaks/ diff --git a/content/en/profiler/enabling/supported_versions.md b/content/en/profiler/enabling/supported_versions.md index 4a677c3b5c3..8fb89965d2f 100644 --- a/content/en/profiler/enabling/supported_versions.md +++ b/content/en/profiler/enabling/supported_versions.md @@ -30,7 +30,7 @@ The following table shows profile type availability by language. For optimal per |
| [Java][1] | [Python][2] | [Go][3] | [Ruby][4] | [Node.js][5] | [.NET][6] | [PHP][7] | [Rust/C/C++][8] | |-----------------------------------|:-------------------------------------------------:|:-------:|:------------:|:------:|:---------:|:-------:|:------:|:----------:| -| {{< ci-details title="CPU" >}}The time each function/method spent running on the CPU.{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< tooltip glossary="preview" case="title" >}} | +| {{< ci-details title="CPU" >}}The time each function/method spent running on the CPU.{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< tooltip glossary="preview" case="title" >}} | | {{< ci-details title="Exceptions" >}}The number of exceptions raised, including those caught.{{< /ci-details >}} | {{< X >}} | Python 3.7+ | | | | {{< X >}} | {{< X >}} | | | {{< ci-details title="Allocation" >}}Number and sizes of memory allocations made by each function/method, including allocations which were subsequently freed.{{< /ci-details >}} | [JDK 11+][17] | Python 3.6+ | {{< X >}} | {{< X >}} | | {{< tooltip glossary="preview" case="title" >}}
.NET 6+
(.NET 10 recommended)| {{< X >}} | {{< tooltip glossary="preview" case="title" >}} | | {{< ci-details title="Heap" >}}The amount of heap memory allocated that remains in use.{{< /ci-details >}} | [JDK 11+][17] | Python 3.6+ | {{< X >}} | {{< tooltip glossary="preview" case="title" >}}
Ruby 3.1+
Not yet compatible with Ruby 4 | {{< X >}} | {{< tooltip glossary="preview" case="title" >}}
.NET 7+
(.NET 10 recommended) | | {{< tooltip glossary="preview" case="title" >}} | @@ -47,7 +47,7 @@ The following table outlines additional profiling features by language. For full | {{< ci-details title="Trace to Profiling integration" >}}Find specific lines of code related to performance issues. Learn more{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | | | {{< ci-details title="Endpoint Profiling" >}}Identify endpoints that are bottlenecks or responsible for heavy resource consumption. Learn more{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | | | {{< ci-details title="Timeline View" >}}Surface time-based patterns and work distribution over the period of a span. Learn more{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | | -| {{< ci-details title="Memory Leaks" >}}A guided workflow to assist in investigating memory leaks. Learn more{{< /ci-details >}} | {{< X >}} | | {{< X >}} | | | | | | +| {{< ci-details title="Memory Leaks" >}}A guided workflow to assist in investigating memory leaks. Learn more{{< /ci-details >}} | {{< X >}} | | {{< X >}} | | | {{< X >}}| | | ## Further reading diff --git a/content/en/profiler/guide/solve-memory-leaks.md b/content/en/profiler/guide/solve-memory-leaks.md index 7e9b39608e2..8763a5ccd5c 100644 --- a/content/en/profiler/guide/solve-memory-leaks.md +++ b/content/en/profiler/guide/solve-memory-leaks.md @@ -11,9 +11,9 @@ further_reading: ## Overview -Profiling has several datasets to help solve memory leaks, such as the Live Heap profile type, which is [available for multiple languages][1]. +Profiling has several datasets to help solve memory leaks, such as the Heap profile type, which is [available for multiple languages][1]. -To help you get started, Datadog provides an end-to-end, guided walkthrough for Go or Java services: +To help you get started, Datadog provides an end-to-end, guided walkthrough for your service within the [APM service page][5]: {{< img src="profiler/guide-memory-leak/service-page-memory-leak.png" alt="Memory Leak walkthrough entrypoint in the Service Page" style="width:100%;" >}} @@ -25,29 +25,35 @@ The walkthrough guides you through several steps to: 1. Scope to the relevant data. 2. Recommend Datadog integrations and upgrades that assist in the investigation. 3. Explain how memory management works in your runtime. -4. Propose potential root causes through [Profile Comparisons][2]. +4. Confirm potential memory leaks by inspecting retained objects through [Profile Comparisons][2]. ## Requirements To use this walkthrough, you need: -* A containerized Go or Java service with either the Datadog Kubernetes integration or the Datadog Container integration installed. +* A containerized service with either the Datadog Kubernetes integration or the Datadog Container integration installed. * [Continuous Profiler enabled][3]. * Ensure that your profiles are tagged with `container_id`. This is necessary to link between container memory utilization metrics and profiling data. + * For Java and .NET ensure that heap profiling is enabled so that heap data is available for analysis. + * For Java: [Enabling the heap histogram metrics][6] + * For .NET: [Heap snapshot][7] ## Get started To investigate a memory leak using the guided walkthrough: 1. Go to **[APM > Software Catalog][4]**. -1. Hover over the service you want to investigate and click **Service Page**. -1. Click the **Memory Leaks** tab. -1. Follow the guided steps to complete your investigation. +2. Hover over the service you want to investigate and click **Service Page**. +3. Click the **Memory Leaks** tab. +4. Follow the guided steps to complete your investigation. [1]: /profiler/enabling/supported_versions/#profile-types [2]: /profiler/compare_profiles [3]: /profiler/enabling [4]: https://app.datadoghq.com/services +[5]: /tracing/services/service_page/#memory-leaks +[6]: /profiler/profiler_troubleshooting/java/?tab=jfr#enabling-the-heap-histogram-metrics +[7]: /profiler/enabling/dotnet/#configuration ## Further reading diff --git a/content/en/profiler/profiler_troubleshooting/java.md b/content/en/profiler/profiler_troubleshooting/java.md index 5e5b1b98d9b..a136d29f13b 100644 --- a/content/en/profiler/profiler_troubleshooting/java.md +++ b/content/en/profiler/profiler_troubleshooting/java.md @@ -59,7 +59,7 @@ jdk.ObjectAllocationOutsideTLAB#enabled=true [Learn how to use override templates.](#creating-and-using-a-jfr-template-override-file) ## Enabling the heap profiler -
This feature requires at least Java 11.0.12, 15.0.4, 16.0.2, 17.0.3 or 18 and newer
+
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. Alternatively, you can enable the following events in your `jfp` [override template file](#creating-and-using-a-jfr-template-override-file): @@ -71,7 +71,7 @@ jdk.OldObjectSample#enabled=true [Learn how to use override templates.](#creating-and-using-a-jfr-template-override-file) ## Enabling the heap histogram metrics -
This feature requires at least Java 17.0.9 or newer and does not work with ZGC
+
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. @@ -183,7 +183,7 @@ Below are basic troubleshooting steps for resolving those issues: - Use dd-trace-java Version 1.47.0 or later Starting with v1.47.0, the profiler uses PID-specific subdirectories inside the configured temp directory. This reduces clutter and potential conflicts from orphaned files when JVM processes exit unexpectedly. - + - Specify a custom executable temp directory To ensure proper operation across environments, explicitly configure a writable, executable temp directory using the following JVM option: ``` @@ -201,7 +201,7 @@ Below are basic troubleshooting steps for resolving those issues: java -Ddd.profiling.tempdir=/opt/datadog-profiler-tmp -javaagent:/path/to/dd-java-agent.jar ... ``` - If you enable profiling using SSI, you can include the below environment variable in the `application_monitoring.yaml`. - + ``` DD_PROFILING_TEMPDIR: ```