Skip to content

Commit fb5b7ef

Browse files
committed
[PROF-13293]feat: update memory leak documentation
1 parent 197fa41 commit fb5b7ef

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

content/en/profiler/enabling/dotnet.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The following profiling features are available in the following minimum versions
7676
- 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
7777
- Continuous Profiler is not supported for AWS Lambda.
7878
- Continuous Profiler does not support ARM64.
79-
79+
8080
<div class="alert alert-danger">
8181
<strong>Note:</strong> 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.
8282
</div>
@@ -100,11 +100,11 @@ You can install the Datadog .NET Profiler machine-wide so that any services on t
100100
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.
101101

102102
<div class="alert alert-danger">
103-
<strong>Note:</strong> If APM was already manually installed, you must uninstall it by removing the following environment variables:<br />
103+
<strong>Note:</strong> If APM was already manually installed, you must uninstall it by removing the following environment variables:<br />
104104
- <code>CORECLR_ENABLE_PROFILING</code><br />
105105
- <code>CORECLR_PROFILER</code><br />
106106
- <code>CORECLR_PROFILER_PATH</code><br />
107-
- The value that points to <code>Datadog.Linux.ApiWrapper.x64.so</code> in <code>LD_PRELOAD</code><br /><br />
107+
- The value that points to <code>Datadog.Linux.ApiWrapper.x64.so</code> in <code>LD_PRELOAD</code><br /><br />
108108
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.
109109
If these environment variables are still set, the corresponding previously installed version is silently used instead of the one installed with Single Step Instrumentation.
110110
</div>
@@ -471,7 +471,7 @@ You can configure the profiler using the following environment variables. Note t
471471
| `DD_PROFILING_HEAP_ENABLED` | Boolean | If set to `true`, enables Live Heap profiling (in Preview). Defaults to `false`. |
472472
| `DD_PROFILING_GC_ENABLED` | Boolean | If set to `false`, disables Garbage Collection profiling used in Timeline user interface. Defaults to `true`. |
473473
| `DD_PROFILING_HTTP_ENABLED` | Boolean | If set to `true`, enables outgoing HTTP request profiling used in Timeline user interface. Defaults to `false`. |
474-
| `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`. |
474+
| `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`. |
475475

476476

477477
<div class="alert alert-danger">
@@ -495,3 +495,4 @@ The [Getting Started with Profiler][4] guide takes a sample service with a perfo
495495
[12]: /profiler/connect_traces_and_profiles/#identify-code-hotspots-in-slow-traces
496496
[13]: /profiler/connect_traces_and_profiles/#break-down-code-performance-by-api-endpoints
497497
[14]: /profiler/enabling/supported_versions/
498+
[15]: /profiler/guide/solve-memory-leaks/

content/en/profiler/enabling/supported_versions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following table shows profile type availability by language. For optimal per
3030

3131
| <div style="width:150px"><div> | [Java][1] | [Python][2] | [Go][3] | [Ruby][4] | [Node.js][5] | [.NET][6] | [PHP][7] | [Rust/C/C++][8] |
3232
|-----------------------------------|:-------------------------------------------------:|:-------:|:------------:|:------:|:---------:|:-------:|:------:|:----------:|
33-
| {{< 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" >}} |
33+
| {{< 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" >}} |
3434
| {{< ci-details title="Exceptions" >}}The number of exceptions raised, including those caught.{{< /ci-details >}} | {{< X >}} | Python 3.7+ | | | | {{< X >}} | {{< X >}} | |
3535
| {{< 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" >}}<br>.NET 6+ <br>(.NET 10 recommended)| {{< X >}} | {{< tooltip glossary="preview" case="title" >}} |
3636
| {{< 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" >}}<br>Ruby 3.1+<br>Not yet compatible with Ruby 4 | {{< X >}} | {{< tooltip glossary="preview" case="title" >}}<br>.NET 7+ <br>(.NET 10 recommended) | | {{< tooltip glossary="preview" case="title" >}} |
@@ -47,7 +47,7 @@ The following table outlines additional profiling features by language. For full
4747
| {{< ci-details title="Trace to Profiling integration" >}}Find specific lines of code related to performance issues. <a href="/profiler/connect_traces_and_profiles/#identify-code-hotspots-in-slow-traces">Learn more</a>{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | |
4848
| {{< ci-details title="Endpoint Profiling" >}}Identify endpoints that are bottlenecks or responsible for heavy resource consumption. <a href="/profiler/connect_traces_and_profiles/#endpoint-profiling">Learn more</a>{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | |
4949
| {{< ci-details title="Timeline View" >}}Surface time-based patterns and work distribution over the period of a span. <a href="/profiler/connect_traces_and_profiles/#span-execution-timeline-view">Learn more</a>{{< /ci-details >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} | |
50-
| {{< ci-details title="Memory Leaks" >}}A guided workflow to assist in investigating memory leaks. <a href="/profiler/guide/solve-memory-leaks/">Learn more</a>{{< /ci-details >}} | {{< X >}} | | {{< X >}} | | | | | |
50+
| {{< ci-details title="Memory Leaks" >}}A guided workflow to assist in investigating memory leaks. <a href="/profiler/guide/solve-memory-leaks/">Learn more</a>{{< /ci-details >}} | {{< X >}} | | {{< X >}} | | | {{< X >}}| | |
5151

5252
## Further reading
5353

content/en/profiler/guide/solve-memory-leaks.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ further_reading:
1111

1212
## Overview
1313

14-
Profiling has several datasets to help solve memory leaks, such as the Live Heap profile type, which is [available for multiple languages][1].
14+
Profiling has several datasets to help solve memory leaks, such as the Heap profile type, which is [available for multiple languages][1].
1515

16-
To help you get started, Datadog provides an end-to-end, guided walkthrough for Go or Java services:
16+
To help you get started, Datadog provides an end-to-end, guided walkthrough for your service within the [APM service page][5]:
1717

1818
{{< img src="profiler/guide-memory-leak/service-page-memory-leak.png" alt="Memory Leak walkthrough entrypoint in the Service Page" style="width:100%;" >}}
1919

@@ -25,29 +25,35 @@ The walkthrough guides you through several steps to:
2525
1. Scope to the relevant data.
2626
2. Recommend Datadog integrations and upgrades that assist in the investigation.
2727
3. Explain how memory management works in your runtime.
28-
4. Propose potential root causes through [Profile Comparisons][2].
28+
4. Confirm potential memory leaks by inspecting retained objects through [Profile Comparisons][2].
2929

3030
## Requirements
3131

3232
To use this walkthrough, you need:
33-
* A containerized Go or Java service with either the Datadog Kubernetes integration or the Datadog Container integration installed.
33+
* A containerized service with either the Datadog Kubernetes integration or the Datadog Container integration installed.
3434
* [Continuous Profiler enabled][3].
3535
* Ensure that your profiles are tagged with `container_id`. This is necessary to link between container memory utilization metrics and profiling data.
36+
* For Java and .NET ensure that heap profiling is enabled so that heap data is available for analysis.
37+
* For Java: [Enabling the heap histogram metrics][6]
38+
* For .NET: [Heap snapshot][7]
3639

3740
## Get started
3841

3942
To investigate a memory leak using the guided walkthrough:
4043

4144
1. Go to **[APM > Software Catalog][4]**.
42-
1. Hover over the service you want to investigate and click **Service Page**.
43-
1. Click the **Memory Leaks** tab.
44-
1. Follow the guided steps to complete your investigation.
45+
2. Hover over the service you want to investigate and click **Service Page**.
46+
3. Click the **Memory Leaks** tab.
47+
4. Follow the guided steps to complete your investigation.
4548

4649

4750
[1]: /profiler/enabling/supported_versions/#profile-types
4851
[2]: /profiler/compare_profiles
4952
[3]: /profiler/enabling
5053
[4]: https://app.datadoghq.com/services
54+
[5]: /tracing/services/service_page/#memory-leaks
55+
[6]: /profiler/profiler_troubleshooting/java/?tab=jfr#enabling-the-heap-histogram-metrics
56+
[7]: /profiler/enabling/dotnet/#configuration
5157

5258
## Further reading
5359

content/en/profiler/profiler_troubleshooting/java.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jdk.ObjectAllocationOutsideTLAB#enabled=true
5959
[Learn how to use override templates.](#creating-and-using-a-jfr-template-override-file)
6060

6161
## Enabling the heap profiler
62-
<div class="aler alert-info">This feature requires at least Java 11.0.12, 15.0.4, 16.0.2, 17.0.3 or 18 and newer</div>
62+
<div class="alert alert-info">This feature requires at least Java 11.0.12, 15.0.4, 16.0.2, 17.0.3 or 18 and newer</div>
6363
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.
6464

6565
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
7171
[Learn how to use override templates.](#creating-and-using-a-jfr-template-override-file)
7272

7373
## Enabling the heap histogram metrics
74-
<div class="aler alert-info">This feature requires at least Java 17.0.9 or newer and does not work with ZGC</div>
74+
<div class="alert alert-info">This feature requires at least Java 17.0.9 or newer and does not work with ZGC</div>
7575

7676
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.
7777

@@ -183,7 +183,7 @@ Below are basic troubleshooting steps for resolving those issues:
183183
184184
- Use dd-trace-java Version 1.47.0 or later
185185
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.
186-
186+
187187
- Specify a custom executable temp directory
188188
To ensure proper operation across environments, explicitly configure a writable, executable temp directory using the following JVM option:
189189
```
@@ -201,7 +201,7 @@ Below are basic troubleshooting steps for resolving those issues:
201201
java -Ddd.profiling.tempdir=/opt/datadog-profiler-tmp -javaagent:/path/to/dd-java-agent.jar ...
202202
```
203203
- If you enable profiling using SSI, you can include the below environment variable in the `application_monitoring.yaml`.
204-
204+
205205
```
206206
DD_PROFILING_TEMPDIR: <path_to_writable_exec_enabled_directory>
207207
```

0 commit comments

Comments
 (0)