From 168121cf008e1100757ebb7ce2ae9b571f0e43f2 Mon Sep 17 00:00:00 2001 From: Florian Engelhardt Date: Fri, 17 Oct 2025 16:25:26 +0200 Subject: [PATCH 1/2] update docs --- content/en/profiler/enabling/php.md | 41 ++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/content/en/profiler/enabling/php.md b/content/en/profiler/enabling/php.md index 8e550cc8c3600..9b72efbaf7b45 100644 --- a/content/en/profiler/enabling/php.md +++ b/content/en/profiler/enabling/php.md @@ -32,11 +32,11 @@ PHP ZTS builds are supported since `dd-trace-php` version 0.99+, while PHP debug {{% tab "GNU C Linux" %}} An operating system with glibc 2.17 or newer is required. The following versions or newer meet this requirement: - - CentOS 7. - - Debian 8, which has reached end of life (EOL). - - Ubuntu 14.04, which is EOL. + - CentOS 7 + - Debian 8 + - Ubuntu 14.04 -Datadog recommends running an OS version that is not EOL. +All of them have reached end of life (EOL), Datadog recommends running an OS version that is not EOL. {{% /tab %}} {{% tab "Alpine Linux" %}} @@ -70,27 +70,44 @@ To begin profiling applications: 2. Download the `datadog-setup.php` script from the [GitHub release page][3]. Version 0.69.0 is the first tracer release to include this installer. -3. Run the installer to install both the tracer and profiler, for example `php datadog-setup.php --enable-profiling`. This script is interactive and asks which of the detected PHP locations it should install to. At the end of the script, it outputs the non-interactive version of the command arguments for future use. + ```shell + curl --proto '=https' --tlsv1.2 -sSfLO \ + https://github.com/DataDog/dd-trace-php/releases/latest/download/datadog-setup.php + ``` -4. Configure the profiler using config mode through the `datadog-setup.php`: +3. Run the installer to install both the tracer and profiler. This script is interactive and asks which of the detected PHP locations it should install to. At the end of the script, it outputs the non-interactive version of the command arguments for future use. + ```shell + php datadog-setup.php --enable-profiling --php-bin=all ``` - # `datadog.profiling.enabled` is not required for v0.82.0+. - php datadog-setup.php config set -d datadog.profiling.enabled=1 +4. **Optional:** Configure the profiler using config mode through the `datadog-setup.php`: + + ```shell php datadog-setup.php config set \ -d datadog.service=app-name \ -d datadog.env=prod \ -d datadog.version=1.3.2 - - php hello.php ``` - Apache, PHP-FPM and other servers require a restart after changing the INI -settings. + Apache, PHP-FPM, FrankenPHP and other servers require a restart after changing the INI settings. See the [configuration docs][4] for more INI settings. +5. Validate the profiler extension is loaded and enabled by executing `php -v` and validate that you see `datadog-profiling` in the output. + + ```shell + php -v + ``` + + ``` + PHP 8.4.13 (cli) (built: Sep 5 2025 11:52:54) (ZTS) + Copyright (c) The PHP Group + Zend Engine v4.4.13, Copyright (c) Zend Technologies + with Zend OPcache v8.4.13, Copyright (c), by Zend Technologies + with datadog-profiling v1.13.0, Copyright Datadog, by Datadog + ``` + 5. A minute or two after receiving a request, profiles appear on the [APM > Profiler page][5]. ## Not sure what to do next? From 79520831673a675aa12d608272d34992b2431aeb Mon Sep 17 00:00:00 2001 From: Florian Engelhardt Date: Fri, 17 Oct 2025 20:38:53 +0200 Subject: [PATCH 2/2] Update content/en/profiler/enabling/php.md Co-authored-by: Heston Hoffman --- content/en/profiler/enabling/php.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/profiler/enabling/php.md b/content/en/profiler/enabling/php.md index 9b72efbaf7b45..47bbc5e7e3d01 100644 --- a/content/en/profiler/enabling/php.md +++ b/content/en/profiler/enabling/php.md @@ -36,7 +36,7 @@ An operating system with glibc 2.17 or newer is required. The following versions - Debian 8 - Ubuntu 14.04 -All of them have reached end of life (EOL), Datadog recommends running an OS version that is not EOL. +**Note**: The operating system versions above have all reached end of life (EOL), Datadog recommends running more recent versions. {{% /tab %}} {{% tab "Alpine Linux" %}}