AppSignal for PHP configuration options

AppSignal for PHP can be configured through the config/appsignal.php file or by using environment variables. This page lists all available configuration options.

Learn more about the configuration load order.

Once you have configured AppSignal, you can validate the current config:

Shell
vendor/bin/appsignal validate

Available options

collector_endpoint

Config file keycollector_endpoint
System environment keyAPPSIGNAL_COLLECTOR_ENDPOINT
Requiredyes
TypeString
Default valuenull (unset by default)

Description

The URL of the AppSignal collector to send trace, metric, and log data to.

AppSignal shows this URL when you create a new application, and it's also available for existing applications.

config/appsignal.php
return [ 'collector_endpoint' => $_ENV['APPSIGNAL_COLLECTOR_ENDPOINT'] ?? null, // ... other options ];

environment

Config file keyenvironment
System environment keyAPPSIGNAL_APP_ENV
Requiredyes
TypeString
Default valuenull (unset by default)

Description

The environment of the app to be reported to AppSignal.

config/appsignal.php
return [ 'environment' => $_ENV['APPSIGNAL_APP_ENV'] ?? 'production', // ... other options ];

Note: Changing the name or environment of an existing app will create a new app on AppSignal.com.

name

Config file keyname
System environment keyAPPSIGNAL_APP_NAME
Requiredyes
TypeString
Default valuenull (unset by default)

Description

The display name of your application on AppSignal.com.

config/appsignal.php
return [ 'name' => 'My App', // ... other options ];

Note: Changing the name or environment of an existing app will create a new app on AppSignal.com.

push_api_key

Config file keypush_api_key
System environment keyAPPSIGNAL_PUSH_API_KEY
Requiredyes
TypeString
Default valuenull (unset by default)

Description

The organization-level key used to authenticate with the Push API.

Read more about the AppSignal Push API key.

config/appsignal.php
return [ 'push_api_key' => $_ENV['APPSIGNAL_PUSH_API_KEY'] ?? '00000000-0000-0000-0000-000000000000', // ... other options ];

active

Config file keyactive
System environment keyAPPSIGNAL_ACTIVE
Requiredno
TypeBoolean (true / false)
Default valuefalse

Description

Configure whether AppSignal is active for a given environment. Most commonly used in the file configuration per environment.

app_path

Config file keyapp_path
Requiredno
TypeString
Default valuedetected from project root

Description

The location of the app on the host's file system.

Helps AppSignal clean up backtraces by stripping the absolute app path from backtrace lines, showing only paths within the project directory. This makes our Backtrace links feature possible.

The AppSignal package sets this value automatically based on the detected project root. If the automatic app path detection doesn't work, you can override it:

config/appsignal.php
return [ 'app_path' => '/var/www/html/your-app' // ... other options ];

filter_attributes

Config file keyfilter_attributes
System environment keyAPPSIGNAL_FILTER_ATTRIBUTES
Requiredno
TypeArray<String>
Default value[]

Description

The filter_attributes config option allows you to filter out specific attributes from being reported to AppSignal. This can be useful to filter out sensitive or non-relevant information from being reported.

If an attribute is filtered out this way, it will not show up in the interface at all.

config/appsignal.php
return [ 'filter_attributes' => ['my.secret.attribute', 'some.opentelemetry.attribute'], // ... other options ];

filter_function_parameters

Config file keyfilter_function_parameters
System environment keyAPPSIGNAL_FILTER_FUNCTION_PARAMETERS
Requiredno
TypeArray<String>
Default value[]

Description

This config option allows you to filter out any function parameters set in the appsignal.function.parameters span attribute.

AppSignal replaces values for the keys listed in the filter_function_parameters config option with [FILTERED].

config/appsignal.php
return [ 'filter_function_parameters' => ['api_token', 'secret'], // ... other options ];

filter_request_payload

Config file keyfilter_request_payload
System environment keyAPPSIGNAL_FILTER_REQUEST_PAYLOAD
Requiredno
TypeArray<String>
Default value[]

Description

This config option allows you to filter out any request payload data set in the appsignal.request.payload span attribute.

AppSignal replaces values for the keys listed in the filter_request_payload config option with [FILTERED].

Read more about request query parameter filtering.

config/appsignal.php
return [ 'filter_request_payload' => ['password', 'cvv'], // ... other options ];

filter_request_query_parameters

Config file keyfilter_request_query_parameters
System environment keyAPPSIGNAL_FILTER_REQUEST_QUERY_PARAMETERS
Requiredno
TypeArray<String>
Default value[]

Description

This config option allows you to filter out any request query parameters set in the appsignal.request.query_parameters span attribute.

AppSignal replaces values for the keys listed in the filter_request_query_parameters config option with [FILTERED].

Read more about request query parameter filtering.

config/appsignal.php
return [ 'filter_request_query_parameters' => ['password', 'cvv'], // ... other options ];

filter_request_session_data

Config file keyfilter_request_session_data
System environment keyAPPSIGNAL_FILTER_REQUEST_SESSION_DATA
Requiredno
TypeArray<String>
Default value[]

Description

The filter_request_session_data config option allows you to filter out any request session data set in the appsignal.request.session_data span attribute.

AppSignal replaces values for the keys listed in the filter_request_session_data config option with [FILTERED].

Read more about request session data filtering.

config/appsignal.php
return [ 'filter_request_session_data' => ['password', 'cvv'], // ... other options ];

hostname

Config file keyhostname
System environment keyAPPSIGNAL_HOSTNAME
Requiredno
TypeString
Default valuedetected from system

Description

Helps AppSignal recognize different hosts for traces and tag them automatically with the hostname.

The AppSignal package sets this value automatically using gethostname().

ignore_actions

Config file keyignore_actions
System environment keyAPPSIGNAL_IGNORE_ACTIONS
Requiredno
TypeArray<String>
Default value[]

Description

With this config option you can specify a list of actions that will be ignored by AppSignal. Everything that happens including exceptions will not be transmitted to AppSignal. This can be useful to ignore health check endpoints or other actions that you don't want to monitor.

Read more about ignoring actions.

config/appsignal.php
return [ 'ignore_actions' => ['GET /health_check', 'POST /ping'], // ... other options ];

ignore_errors

Config file keyignore_errors
System environment keyAPPSIGNAL_IGNORE_ERRORS
Requiredno
TypeArray<String>
Default value[]

Description

This config option allows you to ignore specific errors from being reported to AppSignal. This can be useful to ignore expected errors or errors that can't be solved.

Read more about ignoring errors.

config/appsignal.php
return [ 'ignore_errors' => ['MyCustomError', 'ExpectedError'], // ... other options ];

ignore_logs

Config file keyignore_logs
System environment keyAPPSIGNAL_IGNORE_LOGS
Requiredno
TypeArray<String>
Default value[]

Description

List of log messages that will be ignored. Any log message containing any of the elements of the list will not be transmitted to AppSignal. A small subset of regex syntax is supported, read more about it in our Ignore Logs guide.

The expected format is a comma-separated list of values.

config/appsignal.php
return [ 'ignore_logs' => ["^success", "OK"], // ... other options ];

ignore_namespaces

Config file keyignore_namespaces
System environment keyAPPSIGNAL_IGNORE_NAMESPACES
Requiredno
TypeArray<String>
Default value[]

Description

This config option allows you to ignore specific namespaces from being reported to AppSignal. This can be useful to ignore specific parts of your application from being monitored.

Read more about namespaces.

config/appsignal.php
return [ 'ignore_namespaces' => ['admin', 'secret'], // ... other options ];

request_headers

Config file keyrequest_headers
System environment keyAPPSIGNAL_REQUEST_HEADERS
Requiredno
TypeArray<String>
Default value["accept", "accept-charset", "accept-encoding", "accept-language", "cache-control", "connection", "content-length", "host", "range"]

Description

Configure which request headers to include when a request is made to an HTTP server. This option is an allowlist. It only includes the headers that are configured. If the list is empty, no headers are included.

AppSignal reads request headers from the HTTP request. Each key is a normalized (lowercase) header name.

config/appsignal.php
return [ 'request_headers' => ['accept-encoding', 'content-length', 'user-agent'], // ... other options ];

To configure AppSignal to not store any HTTP request headers, explicitly set the config value to an empty array.

config/appsignal.php
return [ 'request_headers' => [], // ... other options ];

response_headers

Config file keyresponse_headers
System environment keyAPPSIGNAL_RESPONSE_HEADERS
Requiredno
TypeArray<String>
Default value["accept", "accept-charset", "accept-encoding", "accept-language", "cache-control", "connection", "content-length", "date", "range"]

Description

Configure which response headers to include when a request is made by an HTTP client. This option is an allowlist. It only includes the headers that are configured. If the array is empty, no headers are included.

Each item in this array should be a normalized HTTP response header name (lowercase).

config/appsignal.php
return [ 'response_headers' => ['accept', 'accept-charset', 'accept-encoding'], // ... other options ];

To configure AppSignal to not store any HTTP response headers, explicitly set the config value to an empty array.

config/appsignal.php
return [ 'response_headers' => [], // ... other options ];

revision

Config file keyrevision
System environment keyAPPSIGNAL_REVISION
Requiredno
TypeString
Default valuedetected from git

Description

The currently running version of your app. AppSignal will create a deploy marker when this value changes, and tag all incoming data with the current revision.

The AppSignal package sets this value automatically using git rev-parse HEAD.

Read more about deploy markers in the deploy markers topic.

send_function_parameters

Config file keysend_function_parameters
System environment keyAPPSIGNAL_SEND_FUNCTION_PARAMETERS
Requiredno
TypeBoolean (true / false)
Default valuetrue

Description

Configure whether to include function parameters in traces. If set to false no such data is sent to our servers.

These values are set with the appsignal.function.parameters span attribute.

config/appsignal.php
return [ 'send_function_parameters' => false, // ... other options ];

send_request_payload

Config file keysend_request_payload
System environment keyAPPSIGNAL_SEND_REQUEST_PAYLOAD
Requiredno
TypeBoolean (true / false)
Default valuetrue

Description

Configure whether to send request payload data in traces. If set to false no such data is sent to our servers.

These values are set with the appsignal.request.payload span attribute.

For more information please read about request payload filtering.

config/appsignal.php
return [ 'send_request_payload' => false, // ... other options ];

send_request_query_parameters

Config file keysend_request_query_parameters
System environment keyAPPSIGNAL_SEND_REQUEST_QUERY_PARAMETERS
Requiredno
TypeBoolean (true / false)
Default valuetrue

Description

Configure whether to include request query parameters in traces. If set to false no such data is sent to our servers.

These values are set with the appsignal.request.query_parameters span attribute.

For more information please read about request parameter filtering.

config/appsignal.php
return [ 'send_request_query_parameters' => false, // ... other options ];

send_request_session_data

Config file keysend_request_session_data
System environment keyAPPSIGNAL_SEND_REQUEST_SESSION_DATA
Requiredno
TypeBoolean (true / false)
Default valuetrue

Description

Configure whether to send request session data in traces. If set to false no such data is sent to our servers.

These values are set with the appsignal.request.session_data span attribute.

For more information please read about request session data filtering.

config/appsignal.php
return [ 'send_request_session_data' => false, // ... other options ];

service_name

Config file keyservice_name
System environment keyAPPSIGNAL_SERVICE_NAME
Requiredno
TypeString
Default valuenull (unset by default)

Description

The service name helps AppSignal recognize different services and automatically groups their traces into a matching namespace.

Choose a name that fits your application, like "Web server", "Background worker", "Email service", "Authentication service", etc.

config/appsignal.php
return [ 'service_name' => 'My service name', // ... other options ];