AppSignal for PHP configuration

Configure AppSignal for PHP through the config/appsignal.php file. The appsignal install command creates this file for you.

Shell
vendor/bin/appsignal install

Configure AppSignal

Open config/appsignal.php and set the required values:

Laravel
return [ 'active' => true, 'app_name' => 'My app', 'environment' => 'production', 'push_api_key' => env('APPSIGNAL_PUSH_API_KEY'), 'collector_endpoint' => env('APPSIGNAL_COLLECTOR_ENDPOINT'), ];

Set the Push API key and collector endpoint URL in your .env file:

.env
APPSIGNAL_PUSH_API_KEY=<your-push-api-key> APPSIGNAL_COLLECTOR_ENDPOINT=<your-collector-endpoint-url>

AppSignal provides the Push API key and collector endpoint URL when you create a new application.

Validate configuration

The AppSignal for PHP package includes an appsignal validate command to check that the current configuration is valid.

Shell
vendor/bin/appsignal validate > The AppSignal config is valid.

Test the app

Once your application is configured, start it and check whether data arrives in AppSignal. The "Performance > Traces" page is a good place to start, where you'll see samples of traces from your application.

If you still don't see data after following the installation instructions, contact support and we'll help you finish setup.

All available AppSignal configuration options are listed on the configuration options page.