Skip to content

gosuperscript/heroku-buildpack-php-ddtrace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Datadog APM (ddtrace) PHP extension Heroku buildpack

This Heroku buildpack enables the ddtrace PHP extension.

Requirements

Installation

To add this buildpack to your project, run the following:

heroku buildpacks:add --app <your-app-name> https://github.com/SpeedCurve-Metrics/heroku-buildpack-php-ddtrace.git

Configuration

This buildpack accepts several config vars. All of them are optional:

  • 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.
  • DDTRACE_EXT_RELEASE - The release name of dd-trace-php to download. Defaults to 0.82.0.
  • DDTRACE_EXT_PKG_URL - The URL to a dd-trace-php .deb file. This option overides DDTRACE_EXT_RELEASE.

More information: DDTRACE_EXT_PHP_API

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:

PHP Warning:  PHP Startup: ddtrace: Unable to initialize module
Module compiled with module API=20210902
PHP    compiled with module API=20220829
These options need to match

You can change the version by setting the DDTRACE_EXT_VERSION config var in Heroku. For example:

heroku config:set --app <your-app-name> DDTRACE_EXT_VERSION=20220829

About

Heroku buildpack for enabling the ddtrace PHP extension

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%