You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure to add this buildpack after the PHP buildpack, as a PHP binary is
18
+
needed to run the installer.
19
+
17
20
## Configuration
18
21
19
22
This buildpack accepts several config vars. All of them are optional:
20
23
21
-
-`DDTRACE_EXT_PHP_API` - The PHP API version that your application uses. Defaults to `20210902`. Use `phpinfo()` to find the API version if you're not sure.
22
-
-`DDTRACE_EXT_RELEASE` - The release name of [dd-trace-php](https://github.com/DataDog/dd-trace-php/releases/) to download. Defaults to `0.82.0`.
23
-
-`DDTRACE_EXT_PKG_URL` - The URL to a dd-trace-php `.deb` file. This option overides `DDTRACE_EXT_RELEASE`.
24
-
25
-
### More information: `DDTRACE_EXT_PHP_API`
26
-
27
-
This buildpack does not determine that PHP API version automatically. The default value should work for most PHP versions, but if the version is wrong then you will see warnings like this in your application logs:
28
-
29
-
```
30
-
PHP Warning: PHP Startup: ddtrace: Unable to initialize module
31
-
Module compiled with module API=20210902
32
-
PHP compiled with module API=20220829
33
-
These options need to match
34
-
```
35
-
36
-
You can change the version by setting the `DDTRACE_EXT_PHP_API` config var in Heroku. For example:
-`DD_RELEASE` - The release name of [dd-trace-php](https://github.com/DataDog/dd-trace-php/releases/) to download. Defaults to `0.87.2`.
25
+
-`DD_INSTALLER_URL` - The URL to the `datadog-setup.php` to be used (to be found on the [dd-trace-php release page](https://github.com/DataDog/dd-trace-php/releases/)).
26
+
-`DD_PROFILING_ENABLED` - Set to a non empty value, this will install and enable the profiling extension.
27
+
-`DD_APPSEC_ENABLED` - Set to a non empty value, this will install and enable the appsec extension.
error "The environment variable \$DDTRACE_EXT_PKG_URL has been renamed to \$DD_INSTALLER_URL and it needs to be a URL to the desired 'datadog-setup.php' to be found at https://github.com/DataDog/dd-trace-php/releases"
51
+
fi
52
+
53
+
if [[ -n${DDTRACE_EXT_RELEASE:-} ]];then
54
+
echo"The environment variable \$DDTRACE_EXT_RELEASE got renamed to \$DD_RELEASE, rewriting it for now, please update your environment variable."| indent
55
+
DD_RELEASE=$DDTRACE_EXT_RELEASE
56
+
fi
57
+
58
+
if [[ -n${DDTRACE_EXT_PHP_API} ]];then
59
+
echo"The environment variable \$DDTRACE_EXT_PHP_API is superfluous and will be ignored, feel free to remove it."| indent
error "The package URL is out of date. Please use the 'datadog-setup.php' file URL from the releases at https://github.com/DataDog/dd-trace-php/releases"
77
+
fi
60
78
61
-
mkdir -p $APT_CACHE_DIR/archives/partial
62
-
mkdir -p $BUILD_DIR/.apt
79
+
topic "Downloading installer from $DD_INSTALLER_URL"
0 commit comments