PHP tracer manual Installation
Dash が新機能を発表!インシデントマネジメント、Continuous Profiler など多数の機能が追加されました! Dash イベントで発表された新機能!

PHP tracer manual Installation


Before you start

Datadog strongly encourages you to install the PHP extension through the pre-built packages. If you still prefer to manually install the PHP tracer, follow the steps below.

Install from the .tar.gz archive

Download the latest .tar.gz from the release page.

From the location you downloaded the package:

$ tar -xf datadog-php-tracer.tar.gz -C /

Next, modify the php.ini file to add the extension to the PHP runtime.

Install from source

Download the source code tar.gz or .zip file from the releases page and unzip the file. Then compile and install the extension with the commands below.

$ cd /path/to/dd-trace-php
$ phpize
$ ./configure --enable-ddtrace
$ make
$ sudo make install

Modify the INI file

Modify the php.ini configuration file to make the ddtrace extension available in the PHP runtime. To find out where the INI file is, run the following command:

$ php --ini

Configuration File (php.ini) Path: /usr/local/etc/php/7.2
Loaded Configuration File:         /usr/local/etc/php/7.2/php.ini

Add the following line to the php.ini file.

Depending on how you manually installed the PHP tracer, you also need to add this line to the php.ini file.

# If you installed from .tar.gz

# If you installed from source

After restarting the web server/PHP SAPI (e.g., $ sudo apachectl restart, $ sudo service php-fpm restart, etc.) the extension is enabled. To confirm that the extension is loaded, run:

$ php --ri=ddtrace


Datadog PHP tracer extension

Visit a tracing-enabled endpoint of your application and view the APM UI to see the traces.

Note: It might take a few minutes before traces appear in the UI.