AppSignal for PHP requirements

There are two requirements to get started with the PHP package:

  1. An actively supported PHP version. See our maintenance policy.
  2. The OpenTelemetry PHP extension.

We will guide you through installing the OpenTelemetry extension.

Install OpenTelemetry PHP extension

The OpenTelemetry PHP extension provides hooks in PHP functions that this package uses to instrument your application. This is a PHP extension that you need to install and enable in your PHP environment.

First, make sure the required build dependencies are available on your system.

Ubuntu / Debian
sudo apt-get install gcc make autoconf

Then, install the OpenTelemetry PHP extension using either PECL, pie, pickle, or docker-php-extension-installer:

PECL
pecl install opentelemetry

Finally, enable the extension in your PHP installation's configuration file. The configuration file is usually named php.ini, and its location can be found by running php --ini. Add the following lines to it:

ini
[opentelemetry] extension=opentelemetry.so

When using the docker-php-extension-installer script to install the opentelemetry extension, the extension is automatically enabled and you don't need to manually edit the php.ini file.

Create a new AppSignal application

Please follow the installation guide first, when adding a new application to AppSignal.

At the end of that guide, you will receive a Push API key and a collector endpoint URL. You will need both to configure AppSignal for PHP.