> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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](/php/configuration/load-order).

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

```sh Shell theme={null}
vendor/bin/appsignal validate
```

## Available options

* Required options
  * [`collector_endpoint`](#option-collector_endpoint)
  * [`environment`](#option-environment)
  * [`name`](#option-name)
  * [`push_api_key`](#option-push_api_key)
* Options
  * [`active`](#option-active)
  * [`app_path`](#option-app_path)
  * [`filter_attributes`](#option-filter_attributes)
  * [`filter_function_parameters`](#option-filter_function_parameters)
  * [`filter_request_payload`](#option-filter_request_payload)
  * [`filter_request_query_parameters`](#option-filter_request_query_parameters)
  * [`filter_request_session_data`](#option-filter_request_session_data)
  * [`hostname`](#option-hostname)
  * [`ignore_actions`](#option-ignore_actions)
  * [`ignore_errors`](#option-ignore_errors)
  * [`ignore_logs`](#option-ignore_logs)
  * [`ignore_namespaces`](#option-ignore_namespaces)
  * [`request_headers`](#option-request_headers)
  * [`response_headers`](#option-response_headers)
  * [`revision`](#option-revision)
  * [`send_function_parameters`](#option-send_function_parameters)
  * [`send_request_payload`](#option-send_request_payload)
  * [`send_request_query_parameters`](#option-send_request_query_parameters)
  * [`send_request_session_data`](#option-send_request_session_data)
  * [`service_name`](#option-service_name)

## collector\_endpoint

<a id="option-collector_endpoint" />

| Field                  | Value                          |
| ---------------------- | ------------------------------ |
| Config file key        | `collector_endpoint`           |
| System environment key | `APPSIGNAL_COLLECTOR_ENDPOINT` |
| Required               | yes                            |
| Type                   | `String`                       |
| Default value          | `null` (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.

```php title="config/appsignal.php" theme={null}
return [
    'collector_endpoint' => $_ENV['APPSIGNAL_COLLECTOR_ENDPOINT'] ?? null,
    // ... other options
];
```

## environment

<a id="option-environment" />

| Field                  | Value                     |
| ---------------------- | ------------------------- |
| Config file key        | `environment`             |
| System environment key | `APPSIGNAL_APP_ENV`       |
| Required               | yes                       |
| Type                   | `String`                  |
| Default value          | `null` (unset by default) |

### Description

The environment of the app to be reported to AppSignal.

```php title="config/appsignal.php" theme={null}
return [
    'environment' => $_ENV['APPSIGNAL_APP_ENV'] ?? 'production',
    // ... other options
];
```

<Note>
  **Note**: Changing the [name](#option-name) or environment of an existing app
  will create a new app on AppSignal.com.
</Note>

## name

<a id="option-name" />

| Field                  | Value                     |
| ---------------------- | ------------------------- |
| Config file key        | `name`                    |
| System environment key | `APPSIGNAL_APP_NAME`      |
| Required               | yes                       |
| Type                   | `String`                  |
| Default value          | `null` (unset by default) |

### Description

The display name of your application on AppSignal.com.

```php title="config/appsignal.php" theme={null}
return [
    'name' => 'My App',
    // ... other options
];
```

<Note>
  **Note**: Changing the name or [environment](#option-env) of an existing app
  will create a new app on AppSignal.com.
</Note>

## push\_api\_key

<a id="option-push_api_key" />

| Field                  | Value                     |
| ---------------------- | ------------------------- |
| Config file key        | `push_api_key`            |
| System environment key | `APPSIGNAL_PUSH_API_KEY`  |
| Required               | yes                       |
| Type                   | `String`                  |
| Default value          | `null` (unset by default) |

### Description

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

Read more about the [AppSignal Push API key](/appsignal/terminology#push-api-key).

```php title="config/appsignal.php" theme={null}
return [
    'push_api_key' => $_ENV['APPSIGNAL_PUSH_API_KEY'] ?? '00000000-0000-0000-0000-000000000000',
    // ... other options
];
```

## active

<a id="option-active" />

| Field                  | Value                      |
| ---------------------- | -------------------------- |
| Config file key        | `active`                   |
| System environment key | `APPSIGNAL_ACTIVE`         |
| Required               | no                         |
| Type                   | Boolean (`true` / `false`) |
| Default value          | `false`                    |

### Description

Configure whether AppSignal is active for a given environment. Most commonly used in the [file configuration](/php/configuration) per environment.

## app\_path

<a id="option-app_path" />

| Field           | Value                      |
| --------------- | -------------------------- |
| Config file key | `app_path`                 |
| Required        | no                         |
| Type            | `String`                   |
| Default value   | detected 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](/application/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:

```php title="config/appsignal.php" theme={null}
return [
	'app_path' => '/var/www/html/your-app'
    // ... other options
];
```

## filter\_attributes

<a id="option-filter_attributes" />

| Field                  | Value                         |
| ---------------------- | ----------------------------- |
| Config file key        | `filter_attributes`           |
| System environment key | `APPSIGNAL_FILTER_ATTRIBUTES` |
| Required               | no                            |
| Type                   | `Array<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.

```php title="config/appsignal.php" theme={null}
return [
    'filter_attributes' => ['my.secret.attribute', 'some.opentelemetry.attribute'],
    // ... other options
];
```

## filter\_function\_parameters

<a id="option-filter_function_parameters" />

| Field                  | Value                                  |
| ---------------------- | -------------------------------------- |
| Config file key        | `filter_function_parameters`           |
| System environment key | `APPSIGNAL_FILTER_FUNCTION_PARAMETERS` |
| Required               | no                                     |
| Type                   | `Array<String>`                        |
| Default value          | `[]`                                   |

### Description

This config option allows you to filter out any function parameters set in the [`appsignal.function.parameters` span attribute](/guides/custom-data/function-parameters).

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

```php title="config/appsignal.php" theme={null}
return [
    'filter_function_parameters' => ['api_token', 'secret'],
    // ... other options
];
```

## filter\_request\_payload

<a id="option-filter_request_payload" />

| Field                  | Value                              |
| ---------------------- | ---------------------------------- |
| Config file key        | `filter_request_payload`           |
| System environment key | `APPSIGNAL_FILTER_REQUEST_PAYLOAD` |
| Required               | no                                 |
| Type                   | `Array<String>`                    |
| Default value          | `[]`                               |

### Description

This config option allows you to filter out any request payload data set in the [`appsignal.request.payload` span attribute](/guides/custom-data/request-parameters).

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

Read more about [request query parameter filtering](/application/parameter-filtering).

```php title="config/appsignal.php" theme={null}
return [
    'filter_request_payload' => ['password', 'cvv'],
    // ... other options
];
```

## filter\_request\_query\_parameters

<a id="option-filter_request_query_parameters" />

| Field                  | Value                                       |
| ---------------------- | ------------------------------------------- |
| Config file key        | `filter_request_query_parameters`           |
| System environment key | `APPSIGNAL_FILTER_REQUEST_QUERY_PARAMETERS` |
| Required               | no                                          |
| Type                   | `Array<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](/guides/custom-data/request-parameters).

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

Read more about [request query parameter filtering](/application/parameter-filtering).

```php title="config/appsignal.php" theme={null}
return [
    'filter_request_query_parameters' => ['password', 'cvv'],
    // ... other options
];
```

## filter\_request\_session\_data

<a id="option-filter_request_session_data" />

| Field                  | Value                                   |
| ---------------------- | --------------------------------------- |
| Config file key        | `filter_request_session_data`           |
| System environment key | `APPSIGNAL_FILTER_REQUEST_SESSION_DATA` |
| Required               | no                                      |
| Type                   | `Array<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](/guides/custom-data/request-session-data).

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

Read more about [request session data filtering](/application/session-data-filtering).

```php title="config/appsignal.php" theme={null}
return [
    'filter_request_session_data' => ['password', 'cvv'],
    // ... other options
];
```

## hostname

<a id="option-hostname" />

| Field                  | Value                |
| ---------------------- | -------------------- |
| Config file key        | `hostname`           |
| System environment key | `APPSIGNAL_HOSTNAME` |
| Required               | no                   |
| Type                   | `String`             |
| Default value          | detected 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

<a id="option-ignore_actions" />

| Field                  | Value                      |
| ---------------------- | -------------------------- |
| Config file key        | `ignore_actions`           |
| System environment key | `APPSIGNAL_IGNORE_ACTIONS` |
| Required               | no                         |
| Type                   | `Array<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](/guides/filter-data/ignore-actions).

```php title="config/appsignal.php" theme={null}
return [
    'ignore_actions' => ['GET /health_check', 'POST /ping'],
    // ... other options
];
```

## ignore\_errors

<a id="option-ignore_errors" />

| Field                  | Value                     |
| ---------------------- | ------------------------- |
| Config file key        | `ignore_errors`           |
| System environment key | `APPSIGNAL_IGNORE_ERRORS` |
| Required               | no                        |
| Type                   | `Array<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](/guides/filter-data/ignore-errors).

```php title="config/appsignal.php" theme={null}
return [
    'ignore_errors' => ['MyCustomError', 'ExpectedError'],
    // ... other options
];
```

## ignore\_logs

<a id="option-ignore_logs" />

| Field                  | Value                   |
| ---------------------- | ----------------------- |
| Config file key        | `ignore_logs`           |
| System environment key | `APPSIGNAL_IGNORE_LOGS` |
| Required               | no                      |
| Type                   | `Array<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](/guides/filter-data/ignore-logs) guide.

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

```php title="config/appsignal.php" theme={null}
return [
	'ignore_logs' => ["^success", "OK"],
	// ... other options
];
```

## ignore\_namespaces

<a id="option-ignore_namespaces" />

| Field                  | Value                         |
| ---------------------- | ----------------------------- |
| Config file key        | `ignore_namespaces`           |
| System environment key | `APPSIGNAL_IGNORE_NAMESPACES` |
| Required               | no                            |
| Type                   | `Array<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](/application/namespaces).

```php title="config/appsignal.php" theme={null}
return [
    'ignore_namespaces' => ['admin', 'secret'],
    // ... other options
];
```

## request\_headers

<a id="option-request_headers" />

| Field                  | Value                                                                                                                                  |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Config file key        | `request_headers`                                                                                                                      |
| System environment key | `APPSIGNAL_REQUEST_HEADERS`                                                                                                            |
| Required               | no                                                                                                                                     |
| Type                   | `Array<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.

```php title="config/appsignal.php" theme={null}
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.

```php title="config/appsignal.php" theme={null}
return [
    'request_headers' => [],
	// ... other options
];
```

## response\_headers

<a id="option-response_headers" />

| Field                  | Value                                                                                                                                  |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Config file key        | `response_headers`                                                                                                                     |
| System environment key | `APPSIGNAL_RESPONSE_HEADERS`                                                                                                           |
| Required               | no                                                                                                                                     |
| Type                   | `Array<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).

```php title="config/appsignal.php" theme={null}
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.

```php title="config/appsignal.php" theme={null}
return [
    'response_headers' => [],
	// ... other options
];
```

## revision

<a id="option-revision" />

| Field                  | Value                |
| ---------------------- | -------------------- |
| Config file key        | `revision`           |
| System environment key | `APPSIGNAL_REVISION` |
| Required               | no                   |
| Type                   | `String`             |
| Default value          | detected 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](/application/markers/deploy-markers).

## send\_function\_parameters

<a id="option-send_function_parameters" />

| Field                  | Value                                |
| ---------------------- | ------------------------------------ |
| Config file key        | `send_function_parameters`           |
| System environment key | `APPSIGNAL_SEND_FUNCTION_PARAMETERS` |
| Required               | no                                   |
| Type                   | Boolean (`true` / `false`)           |
| Default value          | `true`                               |

### 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](/guides/custom-data/function-parameters).

```php title="config/appsignal.php" theme={null}
return [
    'send_function_parameters' => false,
    // ... other options
];
```

## send\_request\_payload

<a id="option-send_request_payload" />

| Field                  | Value                            |
| ---------------------- | -------------------------------- |
| Config file key        | `send_request_payload`           |
| System environment key | `APPSIGNAL_SEND_REQUEST_PAYLOAD` |
| Required               | no                               |
| Type                   | Boolean (`true` / `false`)       |
| Default value          | `true`                           |

### 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](/guides/custom-data/request-parameters).

For more information please read about [request payload filtering](/application/parameter-filtering).

```php title="config/appsignal.php" theme={null}
return [
    'send_request_payload' => false,
    // ... other options
];
```

## send\_request\_query\_parameters

<a id="option-send_request_query_parameters" />

| Field                  | Value                                     |
| ---------------------- | ----------------------------------------- |
| Config file key        | `send_request_query_parameters`           |
| System environment key | `APPSIGNAL_SEND_REQUEST_QUERY_PARAMETERS` |
| Required               | no                                        |
| Type                   | Boolean (`true` / `false`)                |
| Default value          | `true`                                    |

### 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](/guides/custom-data/request-parameters).

For more information please read about [request parameter filtering](/application/parameter-filtering).

```php title="config/appsignal.php" theme={null}
return [
    'send_request_query_parameters' => false,
    // ... other options
];
```

## send\_request\_session\_data

<a id="option-send_request_session_data" />

| Field                  | Value                                 |
| ---------------------- | ------------------------------------- |
| Config file key        | `send_request_session_data`           |
| System environment key | `APPSIGNAL_SEND_REQUEST_SESSION_DATA` |
| Required               | no                                    |
| Type                   | Boolean (`true` / `false`)            |
| Default value          | `true`                                |

### 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](/guides/custom-data/request-session-data).

For more information please read about [request session data filtering](/application/session-data-filtering).

```php title="config/appsignal.php" theme={null}
return [
    'send_request_session_data' => false,
    // ... other options
];
```

## service\_name

<a id="option-service_name" />

| Field                  | Value                     |
| ---------------------- | ------------------------- |
| Config file key        | `service_name`            |
| System environment key | `APPSIGNAL_SERVICE_NAME`  |
| Required               | no                        |
| Type                   | `String`                  |
| Default value          | `null` (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.

```php title="config/appsignal.php" theme={null}
return [
    'service_name' => 'My service name',
    // ... other options
];
```
