Skip to content

Commit

Permalink
[NO-TICKET] Document Ruby profiler setting for reading from opentelem…
Browse files Browse the repository at this point in the history
…etry context

This PR documents the setting introduced in version 2.4.0 of the
Datadog Ruby library (DataDog/dd-trace-rb#3984)
to have the Ruby profiler directly read from the opentelemetry context.

This allows customers that want to use the opentelemetry Ruby library
together with profiling to get the full profiler feature set.

(I've also gone ahead and did some small tweaks to the text:
Suggest using the latest version in the config example; Suggest using
Ruby 3.1+ in the requirements).
  • Loading branch information
ivoanjo committed Dec 3, 2024
1 parent 8c3a00f commit 97a0f7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/en/profiler/enabling/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The profiler is shipped within Datadog tracing libraries. If you are already usi

For a summary of the minimum and recommended runtime and tracer versions across all languages, read [Supported Language and Tracer Versions][14].

The Datadog Profiler requires Ruby 2.5+. JRuby and TruffleRuby are not supported.
The Datadog Profiler requires Ruby 2.5+ (Ruby 3.1+ or later are recommended). JRuby and TruffleRuby are not supported.

The following operating systems and architectures are supported:
- Linux (GNU libc) x86-64, aarch64
Expand All @@ -53,7 +53,7 @@ To begin profiling applications:
2. Add the `datadog` gem to your `Gemfile` or `gems.rb` file:

```ruby
gem 'datadog', '~> 2.3'
gem 'datadog', '~> 2.7'
```
3. Install the gems with `bundle install`.

Expand Down Expand Up @@ -125,6 +125,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_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`. |
| `DD_VERSION` | String | The [version][10] of your service. |
Expand All @@ -139,6 +140,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_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`. |
| `c.version` | String | The [version][10] of your service. |
Expand Down

0 comments on commit 97a0f7a

Please sign in to comment.