Skip to content

Commit

Permalink
[NO-TICKET] Add Ruby GVL profiling to documentation
Browse files Browse the repository at this point in the history
This PR adds the Ruby GVL profiling feature to the documentation. This
feature was introduced in
DataDog/dd-trace-rb#3929 and mentioned
in the 2.4.0 release notes
https://github.com/DataDog/dd-trace-rb/releases/tag/v2.4.0 but we had
not yet updated the docs to mention it.
  • Loading branch information
ivoanjo committed Dec 5, 2024
1 parent a7a3021 commit 0cc3c6b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions content/en/profiler/enabling/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ You can configure the profiler using the following environment variables:
| `DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED` | Boolean | Set to `true` to enable heap live objects profiling. It requires that allocation profiling is enabled as well. Defaults to `false`. |
| `DD_PROFILING_EXPERIMENTAL_HEAP_SIZE_ENABLED` | Boolean | Set to `true` to enable heap live size profiling. It requires that heap live objects profiling is enabled as well. Defaults to `false`. |
| `DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED` | Boolean | Automatically enabled when needed, can be used to force enable or disable this feature. See [Profiler Troubleshooting][15] for details. |
| `DD_PROFILING_PREVIEW_GVL_ENABLED` | Boolean | Set to `true` to enable Global VM Lock (GVL) profiling. It requires the profiler to be enabled already and Ruby 3.2+. Defaults to `false`. |
| `DD_PROFILING_PREVIEW_OTEL_CONTEXT_ENABLED` | String | Set to `only` when using profiling directly with `opentelemetry-sdk`, or `true` for auto-detection of the correct context to read from. Defaults to `false`. |
| `DD_ENV` | String | The [environment][10] name, for example: `production`. |
| `DD_SERVICE` | String | The [service][10] name, for example, `web-backend`. |
Expand All @@ -137,6 +138,7 @@ Alternatively, you can set profiler parameters in code with these functions, ins
| `c.profiling.advanced.experimental_heap_enabled` | Boolean | Set to `true` to enable heap live objects profiling. It requires that allocation profiling is enabled as well. Defaults to `false`. |
| `c.profiling.advanced.experimental_heap_size_enabled` | Boolean | Set to `true` to enable heap live size profiling. It requires that heap live objects profiling is enabled as well. Defaults to `false`. |
| `c.profiling.advanced.no_signals_workaround_enabled` | Boolean | Automatically enabled when needed, can be used to force enable or disable this feature. See [Profiler Troubleshooting][15] for details. |
| `c.profiling.advanced.preview_gvl_enabled` | Boolean | Set to `true` to enable Global VM Lock (GVL) profiling. It requires the profiler to be enabled already and Ruby 3.2+. Defaults to `false`. |
| `c.profiling.advanced.preview_otel_context_enabled` | String | Set to `only` when using profiling directly with `opentelemetry-sdk`, or `true` for auto-detection of the correct context to read from. Defaults to `false`. |
| `c.env` | String | The [environment][10] name, for example: `production`. |
| `c.service` | String | The [service][10] name, for example, `web-backend`. |
Expand Down
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 @@ -21,7 +21,7 @@ To use the Datadog Profiler, use at least the minimum versions summarized in the
| | [Java][1] | [Python][2] | [Go][3] | [Ruby][4] | [Node.js][5] | [.NET][6] | [PHP][7] | [Rust/C/C++][8] |
|-----------------------------------|:------------:|:----------------:|:-------------:|:--------------:|:-------------:|:-----------------------------------------------------------------------:|:-------------:|:---------------:|
| <strong>Minimum&nbsp;runtime&nbsp;version</strong> | [JDK&nbsp;8+][17] | Python&nbsp;2.7+ | Go&nbsp;1.19+ | Ruby&nbsp;2.5+ | Node&nbsp;14+ | .NET&nbsp;Core&nbsp;2.1+, .NET&nbsp;5+, .NET&nbsp;Framework&nbsp;4.6.1+ | PHP&nbsp;7.1+ | |
| <strong>Feature-complete runtime version</strong> | [JDK&nbsp;11+][17] | Python&nbsp;3.6+ | Go&nbsp;1.21+ | Ruby&nbsp;3.1+ | Node&nbsp;18+ | .NET&nbsp;7+ | PHP&nbsp;8.0+ | |
| <strong>Feature-complete runtime version</strong> | [JDK&nbsp;11+][17] | Python&nbsp;3.6+ | Go&nbsp;1.21+ | Ruby&nbsp;3.2+ | Node&nbsp;18+ | .NET&nbsp;7+ | PHP&nbsp;8.0+ | |
| <strong>Feature-complete tracing library version</strong> | [latest][9] | [latest][10] | [latest][11] | [latest][12] | [latest][13] | [latest][14] | [latest][15] | [latest][16] |

## Profile types
Expand All @@ -47,7 +47,7 @@ To access additional profiling features, use at least the minimum versions summa
|-----------------------------------|:-------:|:-------:|:------------:|:------:|:---------:|:-------:|:------:|:----------:|
| {{< 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 >}} | [JDK&nbsp;8+][17] | tracer&nbsp;2.12.0,<br>2.11.4, 2.10.7 | tracer&nbsp;1.51.0 | tracer&nbsp;1.21.1 | tracer&nbsp;5.11.0,<br>4.35.0, 3.56.0 | tracer&nbsp;2.30.0 | tracer&nbsp;2.30.0 | |
| {{< 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 >}} | [JDK&nbsp;8+][17] | tracer&nbsp;0.54.0 | tracer&nbsp;1.37.0 | tracer&nbsp;0.52.0 | tracer&nbsp;5.0.0,<br>4.24.0, 3.45.0 | tracer&nbsp;2.15.0 | tracer&nbsp;0.79.0 | |
| {{< 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 >}} | [JDK&nbsp;8+][17] | tracer&nbsp;2.12.0,<br>2.11.4, 2.10.7 | tracer&nbsp;1.51.0 | tracer&nbsp;1.21.1 | tracer&nbsp;5.11.0,<br>4.35.0, 3.56.0 | tracer&nbsp;2.30.0 | tracer&nbsp;0.89.0 | |
| {{< 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 >}} | [JDK&nbsp;8+][17] | tracer&nbsp;2.12.0,<br>2.11.4, 2.10.7 | tracer&nbsp;1.51.0 | tracer&nbsp;1.21.1<br>(2.4.0 for GVL profiling) | tracer&nbsp;5.11.0,<br>4.35.0, 3.56.0 | tracer&nbsp;2.30.0 | tracer&nbsp;0.89.0 | |

## Further reading

Expand Down
4 changes: 4 additions & 0 deletions content/en/profiler/profile_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ Heap Live Size (alpha, v2.3.0+)
: The amount of heap memory allocated by each method that has not yet been garbage collected. This is useful for investigating the overall memory usage of your service and identifying potential memory leaks.<br />
_Requires: Ruby 3.1+_ and [manual enablement][2]

GVL profiling (in Timeline) (preview, v2.4.0+)
: Records time when threads are prevented from working by other "noisy neighbor" threads, including background threads. This is useful for investigating latency spikes in the application when using the timeline visualization.<br />
_Requires: Ruby 3.2+_ and [manual enablement][2]

[1]: /profiler/enabling/ruby/#requirements
[2]: /profiler/enabling/ruby/#configuration
{{< /programming-lang >}}
Expand Down

0 comments on commit 0cc3c6b

Please sign in to comment.