The Datadog Profiler requires Ruby 2.5+. JRuby and TruffleRuby are not supported.
以下の OS、アーキテクチャに対応しています。
Linux (GNU libc) x86-64、aarch64
Alpine Linux (musl libc) x86-64、aarch64
You also need either the pkg-config or the pkgconf system utility installed.
This utility is available on the software repositories of most Linux distributions. For example:
Single Step Instrumentation is not supported for Linux hosts, VMs, or Docker.
Single Step Instrumentation is supported for Kubernetes (using the Datadog Helm chart), but you need to manually set the DD_PROFILING_ENABLED=true environment variable to enable profiling.
Add the ddprofrb exec command to your Ruby application start command:
bundle exec ddprofrb exec ruby myapp.rb
Rails の例:
bundle exec ddprofrb exec bin/rails s
If you’re running a version of ddtrace older than 1.21.0, replace ddprofrb exec with ddtracerb exec.
注
If starting the application with ddprofrb exec is not an option (for example, when using the Phusion Passenger web server), you can alternatively start the profiler by adding the following to your application entry point (such as config.ru, for a web application):
require'datadog/profiling/preload'
Optional: Set up Source Code Integration to connect your profiling data with your Git repositories.
A minute or two after starting your Ruby application, your profiles will show up on the Datadog APM > Profiler page.