Set the environment variables before calling PHP, for example:
export DD_PROFILING_ENABLED=true
export DD_SERVICE=app-name
export DD_ENV=prod
export DD_VERSION=1.3.2
php hello.php
Use the env
directive in the php-fpm’s www.conf
file, for example:
env[DD_PROFILING_ENABLED] = true
env[DD_SERVICE] = app-name
env[DD_ENV] = prod
env[DD_VERSION] = 1.3.2
Use SetEnv
from the server config, virtual host, directory, or .htaccess
file:
SetEnv DD_PROFILING_ENABLED true
SetEnv DD_SERVICE app-name
SetEnv DD_ENV prod
SetEnv DD_VERSION 1.3.2