Skip to content

[PROF-11898] Tweak Ruby stack truncation config documentation #30552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
2 changes: 2 additions & 0 deletions content/en/profiler/enabling/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ You can configure the profiler using the following environment variables:
| --------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `DD_PROFILING_ENABLED` | Boolean | If set to `true`, enables the profiler. Defaults to `false`. |
| `DD_PROFILING_ALLOCATION_ENABLED` | Boolean | Set to `true` to enable allocation profiling. It requires the profiler to be enabled already. Defaults to `false`. |
| `DD_PROFILING_MAX_FRAMES` | Integer | Maximum backtrace (stack) depth gathered by the profiler. Stacks deeper than this value get truncated. Defaults to `400`. |
| `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 the same value as `DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED`. |
| `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. |
Expand All @@ -134,6 +135,7 @@ Alternatively, you can set profiler parameters in code with these functions, ins
| ----------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `c.profiling.enabled` | Boolean | If set to `true`, enables the profiler. Defaults to `false`. |
| `c.profiling.allocation_enabled` | Boolean | Set to `true` to enable allocation profiling. It requires the profiler to be enabled already. Defaults to `false`. |
| `c.profiling.advanced.max_frames` | Integer | Maximum backtrace (stack) depth gathered by the profiler. Stacks deeper than this value get truncated. Defaults to `400`. |
| `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 the same value as `experimental_heap_size_enabled`. |
| `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. |
Expand Down
6 changes: 3 additions & 3 deletions content/en/profiler/profiler_troubleshooting/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ For further help with this issue, [contact support][2] and include the output of

## Frames omitted when backtraces are very deep

The Ruby profiler truncates deep backtraces when collecting profiling data. Truncated backtraces are missing some of their caller functions, making it impossible to link them to the root call frame. As a result, truncated backtraces are grouped together under a `N frames omitted` frame.
The Ruby profiler truncates deep backtraces when collecting profiling data. Truncated backtraces are missing some of their caller functions, making it impossible to link them to the root call frame. As a result, truncated backtraces are grouped together under a `Truncated Frames` (or `N frames omitted` in older versions) frame.

You can increase the maximum depth with the `DD_PROFILING_MAX_FRAMES` environment variable, or in code:
You can increase the maximum backtrace (stack) depth with the `DD_PROFILING_MAX_FRAMES` environment variable, or in code:

```ruby
Datadog.configure do |c|
c.profiling.advanced.max_frames = 500
c.profiling.advanced.max_frames = 600
end
```

Expand Down
Loading