Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions content/en/profiler/enabling/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<div class="alert alert-danger">
<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.
</div>
Expand All @@ -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.

<div class="alert alert-danger">
<strong>Note:</strong> If APM was already manually installed, you must uninstall it by removing the following environment variables:<br />
<strong>Note:</strong> If APM was already manually installed, you must uninstall it by removing the following environment variables:<br />
- <code>CORECLR_ENABLE_PROFILING</code><br />
- <code>CORECLR_PROFILER</code><br />
- <code>CORECLR_PROFILER_PATH</code><br />
- The value that points to <code>Datadog.Linux.ApiWrapper.x64.so</code> in <code>LD_PRELOAD</code><br /><br />
- The value that points to <code>Datadog.Linux.ApiWrapper.x64.so</code> in <code>LD_PRELOAD</code><br /><br />
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.
</div>
Expand Down Expand Up @@ -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`. |


<div class="alert alert-danger">
Expand All @@ -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/
4 changes: 2 additions & 2 deletions content/en/profiler/enabling/supported_versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The following table shows profile type availability by language. For optimal per

| <div style="width:150px"><div> | [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" >}}<br>.NET 6+ <br>(.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" >}}<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" >}} |
Expand All @@ -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. <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 >}} | |
| {{< 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 >}} | |
| {{< 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 >}} | |
| {{< 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 >}} | | | | | |
| {{< 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 >}}| | |

## Further reading

Expand Down
20 changes: 13 additions & 7 deletions content/en/profiler/guide/solve-memory-leaks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%;" >}}

Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions content/en/profiler/profiler_troubleshooting/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<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>
<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>
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):
Expand All @@ -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
<div class="aler alert-info">This feature requires at least Java 17.0.9 or newer and does not work with ZGC</div>
<div class="alert alert-info">This feature requires at least Java 17.0.9 or newer and does not work with ZGC</div>

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.

Expand Down Expand Up @@ -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:
```
Expand All @@ -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: <path_to_writable_exec_enabled_directory>
```
Expand Down
Loading