> ## 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.

# Python package configuration options

The following list includes all configuration options with the name of the environment variable and the name of the key in the configuration file.

For more information on how to configure AppSignal with a configuration file or system environment variables, see our [Configuration](/python/configuration) documentation.

## Available options

* Required options
  * [`active`](#option-active)
  * [`environment`](#option-environment)
  * [`name`](#option-name)
  * [`push_api_key`](#option-push_api_key)
* Options
  * [`bind_address`](#option-bind_address)
  * [`ca_file_path`](#option-ca_file_path)
  * [`collector_endpoint`](#option-collector_endpoint)
  * [`cpu_count`](#option-cpu_count)
  * [`disable_default_instrumentations`](#option-disable_default_instrumentations)
  * [`dns_servers`](#option-dns_servers)
  * [`enable_host_metrics`](#option-enable_host_metrics)
  * [`enable_minutely_probes`](#option-enable_minutely_probes)
  * [`enable_nginx_metrics`](#option-enable_nginx_metrics)
  * [`enable_statsd`](#option-enable_statsd)
  * [`endpoint`](#option-endpoint)
  * [`files_world_accessible`](#option-files_world_accessible)
  * [`filter_attributes`](#option-filter_attributes)
  * [`filter_function_parameters`](#option-filter_function_parameters)
  * [`filter_parameters`](#option-filter_parameters)
  * [`filter_request_payload`](#option-filter_request_payload)
  * [`filter_request_query_parameters`](#option-filter_request_query_parameters)
  * [`filter_session_data`](#option-filter_session_data)
  * [`host_role`](#option-host_role)
  * [`hostname`](#option-hostname)
  * [`http_proxy`](#option-http_proxy)
  * [`ignore_actions`](#option-ignore_actions)
  * [`ignore_errors`](#option-ignore_errors)
  * [`ignore_namespaces`](#option-ignore_namespaces)
  * [`log`](#option-log)
  * [`log_level`](#option-log_level)
  * [`log_path`](#option-log_path)
  * [`nginx_port`](#option-nginx_port)
  * [`opentelemetry_port`](#option-opentelemetry_port)
  * [`request_headers`](#option-request_headers)
  * [`response_headers`](#option-response_headers)
  * [`revision`](#option-revision)
  * [`running_in_container`](#option-running_in_container)
  * [`send_environment_metadata`](#option-send_environment_metadata)
  * [`send_function_parameters`](#option-send_function_parameters)
  * [`send_params`](#option-send_params)
  * [`send_request_payload`](#option-send_request_payload)
  * [`send_request_query_parameters`](#option-send_request_query_parameters)
  * [`send_session_data`](#option-send_session_data)
  * [`service_name`](#option-service_name)
  * [`statsd_port`](#option-statsd_port)
  * [`working_directory_path`](#option-working_directory_path)

## active

<a id="option-active" />

| Field                   | Value                      |
| ----------------------- | -------------------------- |
| Config file key         | `active`                   |
| System environment key  | `APPSIGNAL_ACTIVE`         |
| Required                | yes                        |
| Type                    | Boolean (`true` / `false`) |
| Default value           | `false`                    |
| Available since version | `0.1.0`                    |

### Description

Configure AppSignal to be active or not for a given environment. If AppSignal is not active, no data is reported for the app in the specified environment.

## environment

<a id="option-environment" />

| Field                   | Value               |
| ----------------------- | ------------------- |
| Config file key         | `environment`       |
| System environment key  | `APPSIGNAL_APP_ENV` |
| Required                | yes                 |
| Type                    | `String`            |
| Default value           | `development`       |
| Available since version | `0.1.0`             |

### Description

The environment of the app to be reported to AppSignal.

<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           | nil (This is unset by default) |
| Available since version | `0.1.0`                        |

### Description

Name of your application as it should be displayed on AppSignal.com.

<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           | nil (This is unset by default) |
| Available since version | `0.1.0`                        |

### Description

The organization-level authentication key to authenticate with our Push API.

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

## bind\_address

<a id="option-bind_address" />

| Field                   | Value                    |
| ----------------------- | ------------------------ |
| Config file key         | `bind_address`           |
| System environment key  | `APPSIGNAL_BIND_ADDRESS` |
| Required                | no                       |
| Type                    | `String`                 |
| Default value           | `127.0.0.1`              |
| Available since version | `0.1.5`                  |

### Description

A valid IPv4 address the AppSignal agent uses as a binding for its TCP and UDP servers. Use a specific address if you only want the agent to listen to requests made to that address. Set this option to `0.0.0.0` to allow to receive requests from hosts using any IP address. By default it only listens to requests made on the same host. This option is applied to all the agent servers ([StatsD](#option-enable_statsd), [OpenTelemetry](#option-enable_opentelemetry_http) and [NGINX](#option-enable_nginx_metrics)).

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## ca\_file\_path

<a id="option-ca_file_path" />

| Field                   | Value                            |
| ----------------------- | -------------------------------- |
| Config file key         | `ca_file_path`                   |
| System environment key  | `APPSIGNAL_CA_FILE_PATH`         |
| Required                | no                               |
| Type                    | `String`                         |
| Default value           | Packaged `cacert.pem` file path. |
| Available since version | `0.1.0`                          |

### Description

Use this option to point to another certificate file if there's a problem connecting to our API.

<Note>
  **Note**: The specified path cannot contain Operating Specific file system
  abstractions, such as the homedir symbol `~` for \*NIX systems. This will be
  seen as a malformed path.
</Note>

<Note>
  When using [an external collector](#option-collector_endpoint), this configuration option does not have any effect on how the integration communicates with the external collector. It will still be used when communicating with AppSignal's servers.
</Note>

## collector\_endpoint

<a id="option-collector_endpoint" />

| Field                   | Value                          |
| ----------------------- | ------------------------------ |
| Config file key         | `collector_endpoint`           |
| System environment key  | `APPSIGNAL_COLLECTOR_ENDPOINT` |
| Required                | no                             |
| Type                    | `String`                       |
| Default value           | nil (This is unset by default) |
| Available since version | `1.6.0`                        |

### Description

The address of an externally deployed [AppSignal Collector](/collector). When set,
the AppSignal agent bundled with the integration will not be used, and
OpenTelemetry data will be sent to the collector at this address instead.

<Note>
  This is an **experimental** configuration option. The following functionality
  **will not be available** when using an external collector:

  * [NGINX metrics](/metrics/nginx)
  * [Host metrics](/metrics/host-metrics)
  * [StatsD metrics](/standalone-agent/statsd)

  The following functionality is **only available** when using an external
  collector:

  * [Logging](/logging)
</Note>

## cpu\_count

<a id="option-cpu_count" />

| Field                   | Value                 |
| ----------------------- | --------------------- |
| Config file key         | `cpu_count`           |
| System environment key  | `APPSIGNAL_CPU_COUNT` |
| Required                | no                    |
| Type                    | `Float`               |
| Default value           | `undefined`           |
| Available since version | `1.2.0`               |

### Description

The available CPU capacity of the host, in number of CPUs. This is used to calculate the CPU usage percentage in the host metrics. If not set, the agent will attempt to automatically detect this from cgroups.

The number of CPUs can be a fraction, e.g. `0.5`.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## disable\_default\_instrumentations

<a id="option-disable_default_instrumentations" />

| Field                   | Value                                        |
| ----------------------- | -------------------------------------------- |
| Config file key         | `disable_default_instrumentations`           |
| System environment key  | `APPSIGNAL_DISABLE_DEFAULT_INSTRUMENTATIONS` |
| Required                | no                                           |
| Type                    | `list(String)` or Boolean (`true` / `false`) |
| Default value           | `false`                                      |
| Available since version | `0.1.0`                                      |

### Description

Allows you to disable the automatic instrumentation of default integrations:

* `aiopg`
* `asyncpg`
* `celery`
* `django`
* `flask`
* `mysql`
* `mysqlclient`
* `psycopg`
* `psycopg2`
* `pymysql`
* `redis`
* `jinja2`
* `requests`
* `sqlalchemy`
* `sqlite3`
* `logging`

<Note>
  When using AppSignal for Python 1.5.4 or earlier, prefix each of these names
  with `opentelemetry.instrumentation.`. For example, `jinja2` would be
  specified as `opentelemetry.instrumentation.jinja2`.
</Note>

Note that instrumentations are only enabled if the corresponding OpenTelemetry instrumentation library is installed.

To disable all automatic instrumentations, set the value to `True`.

## dns\_servers

<a id="option-dns_servers" />

| Field                   | Value                   |
| ----------------------- | ----------------------- |
| Config file key         | `dns_servers`           |
| System environment key  | `APPSIGNAL_DNS_SERVERS` |
| Required                | no                      |
| Type                    | `list(String)`          |
| Default value           | `[]`                    |
| Available since version | `0.1.0`                 |

### Description

Configure DNS servers for the AppSignal agent to use.

```sh Shell theme={null}
# In the host environment
export APPSIGNAL_DNS_SERVERS="8.8.8.8,8.8.4.4"
```

If you're affected by our [DNS timeouts](/support/known-issues#dns-timeouts), try setting a DNS server manually using this option that doesn't use more than **4** dots in the server name.

* Acceptable values: `8.8.8.8`, `my.custom.local.server`.
* Not acceptable values: `foo`, `my.awesome.custom.local.dns.server`.

If the DNS server cannot be reached the agent will fall back on the host's DNS configuration and output a message in the `appsignal.log` file: `A problem occurred while setting DNS servers`.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## enable\_host\_metrics

<a id="option-enable_host_metrics" />

| Field                   | Value                           |
| ----------------------- | ------------------------------- |
| Config file key         | `enable_host_metrics`           |
| System environment key  | `APPSIGNAL_ENABLE_HOST_METRICS` |
| Required                | no                              |
| Type                    | Boolean (`true` / `false`)      |
| Default value           | \`\`true` / detected by system` |
| Available since version | `0.1.0`                         |

### Description

Set this option to `false` to disable [host metrics](/metrics/host-metrics) collection.

On Heroku and Dokku host metrics are disabled by default. This is done because these systems will report inaccurate metrics from within the containers. Host metrics collection on these systems cannot be enabled. For Heroku, use the [Heroku log drain](/heroku/host-metrics) instead.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## enable\_minutely\_probes

<a id="option-enable_minutely_probes" />

| Field                   | Value                              |
| ----------------------- | ---------------------------------- |
| Config file key         | `enable_minutely_probes`           |
| System environment key  | `APPSIGNAL_ENABLE_MINUTELY_PROBES` |
| Required                | no                                 |
| Type                    | Boolean (`true` / `false`)         |
| Default value           | `true`                             |
| Available since version | `1.2.0`                            |

### Description

Enables the [minutely probes](/python/instrumentation/minutely-probes) system.

## enable\_nginx\_metrics

<a id="option-enable_nginx_metrics" />

| Field                   | Value                            |
| ----------------------- | -------------------------------- |
| Config file key         | `enable_nginx_metrics`           |
| System environment key  | `APPSIGNAL_ENABLE_NGINX_METRICS` |
| Required                | no                               |
| Type                    | Boolean (`true` / `false`)       |
| Default value           | `false`                          |
| Available since version | `0.1.0`                          |

### Description

Set to `true` to enable the NGINX metrics server. [See the NGINX metrics documentation for details.](/metrics/nginx)

When enabled, the AppSignal agent will listen to a `localhost`-bound server on port 27649. If you're running several AppSignal-instrumented applications in the same server, this configuration option can only be enabled in one of them.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## enable\_statsd

<a id="option-enable_statsd" />

| Field                   | Value                      |
| ----------------------- | -------------------------- |
| Config file key         | `enable_statsd`            |
| System environment key  | `APPSIGNAL_ENABLE_STATSD`  |
| Required                | no                         |
| Type                    | Boolean (`true` / `false`) |
| Default value           | `false`                    |
| Available since version | `0.1.0`                    |

### Description

Enables the [StatsD server](/standalone-agent/statsd) in the AppSignal agent.

When enabled, the AppSignal agent will listen to a `localhost`-bound server on port 8125. If you're running several AppSignal-instrumented applications in the same server, this configuration option can only be enabled in one of them.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## endpoint

<a id="option-endpoint" />

| Field                   | Value                         |
| ----------------------- | ----------------------------- |
| Config file key         | `endpoint`                    |
| System environment key  | `APPSIGNAL_PUSH_API_ENDPOINT` |
| Required                | no                            |
| Type                    | `String`                      |
| Default value           | `https://push.appsignal.com`  |
| Available since version | `0.1.0`                       |

### Description

Configure the endpoint to send data to AppSignal. This setting will not have to be changed.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## files\_world\_accessible

<a id="option-files_world_accessible" />

| Field                   | Value                              |
| ----------------------- | ---------------------------------- |
| Config file key         | `files_world_accessible`           |
| System environment key  | `APPSIGNAL_FILES_WORLD_ACCESSIBLE` |
| Required                | no                                 |
| Type                    | Boolean (`true` / `false`)         |
| Default value           | `true`                             |
| Available since version | `0.1.0`                            |

### Description

If this is set to `true` the [AppSignal working directory](/appsignal/how-appsignal-operates#working-directory) that is created is accessible for all users (Unix permissions `0666`). This is often necessary because processes for the same app run under a different user. Set to `false` to disable this behaviour (Unix permissions `0644`).

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## filter\_attributes

<a id="option-filter_attributes" />

| Field                   | Value                         |
| ----------------------- | ----------------------------- |
| Config file key         | `filter_attributes`           |
| System environment key  | `APPSIGNAL_FILTER_ATTRIBUTES` |
| Required                | no                            |
| Type                    | `list(String)`                |
| Default value           | `[]`                          |
| Available since version | `1.6.0`                       |

### Description

List of OpenTelemetry span attributes to filter with AppSignal. Matching values are replaced with `[FILTERED]`.

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

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).

  See the [filter\_parameters](#option-filter_parameters) configuration
  option for filtering data when using the agent.
</Note>

## 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                    | `list(String)`                         |
| Default value           | `[]`                                   |
| Available since version | `1.6.0`                                |

### Description

List of function parameter attributes to filter with AppSignal. Matching values are replaced with `[FILTERED]`.

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

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).

  See the [filter\_parameters](#option-filter_parameters) configuration
  option for filtering data when using the agent.
</Note>

## filter\_parameters

<a id="option-filter_parameters" />

| Field                   | Value                         |
| ----------------------- | ----------------------------- |
| Config file key         | `filter_parameters`           |
| System environment key  | `APPSIGNAL_FILTER_PARAMETERS` |
| Required                | no                            |
| Type                    | `list(String)`                |
| Default value           | `[]`                          |
| Available since version | `0.1.0`                       |

### Description

List of parameter keys that should be ignored using AppSignal filtering. Their values will be replaced with `[FILTERED]` when transmitted to AppSignal.

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

<Note>
  **Agent only:** when using [an external
  collector](#option-collector_endpoint), this configuration option does not
  have any effect.

  See the following configuration options for filtering
  parameters when using an external collector:

  * [`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)
</Note>

## 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                    | `list(String)`                     |
| Default value           | `[]`                               |
| Available since version | `1.6.0`                            |

### Description

List of request payload attributes to filter with AppSignal. Matching values are replaced with `[FILTERED]`.

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

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).

  See the [filter\_parameters](#option-filter_parameters) configuration
  option for filtering data when using the agent.
</Note>

## 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                    | `list(String)`                              |
| Default value           | `[]`                                        |
| Available since version | `1.6.0`                                     |

### Description

List of request query parameter attributes to filter with AppSignal. Matching values are replaced with `[FILTERED]`.

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

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).

  See the [filter\_parameters](#option-filter_parameters) configuration
  option for filtering data when using the agent.
</Note>

## filter\_session\_data

<a id="option-filter_session_data" />

| Field                   | Value                           |
| ----------------------- | ------------------------------- |
| Config file key         | `filter_session_data`           |
| System environment key  | `APPSIGNAL_FILTER_SESSION_DATA` |
| Required                | no                              |
| Type                    | `list(String)`                  |
| Default value           | `[]`                            |
| Available since version | `0.1.0`                         |

### Description

List of session data keys that should be ignored using AppSignal filtering. Their values will be replaced with `[FILTERED]` when transmitted to AppSignal.

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

## host\_role

<a id="option-host_role" />

| Field                   | Value                          |
| ----------------------- | ------------------------------ |
| Config file key         | `host_role`                    |
| System environment key  | `APPSIGNAL_HOST_ROLE`          |
| Required                | no                             |
| Type                    | `String`                       |
| Default value           | nil (This is unset by default) |
| Available since version | `0.2.2`                        |

### Description

Group hosts by role and generate metrics based on this role. One such metric is the `reporting_hosts` counter metric. A good role indicates what the main role of the server is, like "webserver", "processor", "api", "database", "loadbalancer", etc.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## 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 |
| Available since version | `0.1.0`              |

### Description

This overrides the server's hostname. Useful for when you're unable to set a custom hostname or when a nondescript id is generated for you on hosting services.

## http\_proxy

<a id="option-http_proxy" />

| Field                   | Value                          |
| ----------------------- | ------------------------------ |
| Config file key         | `http_proxy`                   |
| System environment key  | `APPSIGNAL_HTTP_PROXY`         |
| Required                | no                             |
| Type                    | `String`                       |
| Default value           | nil (This is unset by default) |
| Available since version | `0.1.0`                        |

### Description

If you require the agent to connect to the Internet via a proxy set the complete proxy URL in this configuration key.

<Note>
  When using [an external collector](#option-collector_endpoint), this configuration option does not have any effect on how the integration communicates with the external collector. It will still be used when communicating with AppSignal's servers.
</Note>

## ignore\_actions

<a id="option-ignore_actions" />

| Field                   | Value                      |
| ----------------------- | -------------------------- |
| Config file key         | `ignore_actions`           |
| System environment key  | `APPSIGNAL_IGNORE_ACTIONS` |
| Required                | no                         |
| Type                    | `list(String)`             |
| Default value           | `[]`                       |
| Available since version | `0.1.0`                    |

### 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).

## ignore\_errors

<a id="option-ignore_errors" />

| Field                   | Value                     |
| ----------------------- | ------------------------- |
| Config file key         | `ignore_errors`           |
| System environment key  | `APPSIGNAL_IGNORE_ERRORS` |
| Required                | no                        |
| Type                    | `list(String)`            |
| Default value           | `[]`                      |
| Available since version | `0.1.0`                   |

### Description

List of error classes that will be ignored. Any exception raised with this error class will not be transmitted to AppSignal.

Read more about [ignoring errors](/guides/filter-data/ignore-errors).

## ignore\_namespaces

<a id="option-ignore_namespaces" />

| Field                   | Value                         |
| ----------------------- | ----------------------------- |
| Config file key         | `ignore_namespaces`           |
| System environment key  | `APPSIGNAL_IGNORE_NAMESPACES` |
| Required                | no                            |
| Type                    | `list(String)`                |
| Default value           | `[]`                          |
| Available since version | `0.1.0`                       |

### Description

List of namespaces that will be ignored. Any error raised or slow request that occurs in this namespace will not be send to AppSignal.

Read more about [namespaces](/application/namespaces).

## log

<a id="option-log" />

| Field                   | Value           |
| ----------------------- | --------------- |
| Config file key         | `log`           |
| System environment key  | `APPSIGNAL_LOG` |
| Required                | no              |
| Type                    | `String`        |
| Default value           | `file`          |
| Available since version | `0.1.0`         |

### Description

<Note>
  This option configures what logger that AppSignal's internal logging
  functionality will use and does not affect the [logging feature](/logging).

  **Note**: The [AppSignal agent](/appsignal/how-appsignal-operates),
  which is used by the integration, will always write to the "appsignal.log" file.
</Note>

Select which logger the AppSignal integration will use. Accepted values are
`file` and `stdout`. See also the `log_path` configuration.

* `file` (default)
  * Write all AppSignal logs to the file system.
* `stdout` (default on [Heroku](https://heroku.com))
  * Print AppSignal logs in the parent process' STDOUT instead of to a file.
    Useful with hosting solutions such as container systems and Heroku.

<Note>
  When using [an external collector](#option-collector_endpoint), this configuration option does not have any effect on how the collector will emit logs. The integration will still follow this configuration option when emitting logs.
</Note>

## log\_level

<a id="option-log_level" />

| Field                   | Value                 |
| ----------------------- | --------------------- |
| Config file key         | `log_level`           |
| System environment key  | `APPSIGNAL_LOG_LEVEL` |
| Required                | no                    |
| Type                    | `String`              |
| Default value           | `info`                |
| Available since version | `0.1.0`               |

### Description

<Note>
  This option sets the severity level of AppSignal's internal logger and does
  not affect the [logging feature](/logging).
</Note>

Set the severity level of AppSignal's internal logger. If it is configured to "info" it will log all error, warning and info messages, but not log the debug messages.

Setting it to the levels "debug" or "trace" is usually only needed on request from support. Setting the level to "debug"/"trace" could have a slight impact on the disk usage and IO, especially on high-traffic sites. CPU overhead is minimal with the debug option enabled.

Accepted values:

* error
* warning
* info
* debug
* trace

<Note>
  When using [an external collector](#option-collector_endpoint), this configuration option does not have any effect on how the collector will emit logs. The integration will still follow this configuration option when emitting logs.
</Note>

## log\_path

<a id="option-log_path" />

| Field                   | Value                |
| ----------------------- | -------------------- |
| Config file key         | `log_path`           |
| System environment key  | `APPSIGNAL_LOG_PATH` |
| Required                | no                   |
| Type                    | `String`             |
| Default value           | `/tmp`               |
| Available since version | `0.1.0`              |

### Description

<Note>
  This option configures the location of AppSignal's internal logging file and
  does not affect the [logging feature](/logging).

  <br />

  **Note**: The specified path cannot contain Operating Specific file system
  abstractions, such as the homedir symbol `~` for \*NIX systems. This will be
  seen as a malformed path.
</Note>

Override the location of the path (directory) where the `appsignal.log` file can
be written to.

<Note>
  When using [an external collector](#option-collector_endpoint), this configuration option does not have any effect on how the collector will emit logs. The integration will still follow this configuration option when emitting logs.
</Note>

## nginx\_port

<a id="option-nginx_port" />

| Field                   | Value                  |
| ----------------------- | ---------------------- |
| Config file key         | `nginx_port`           |
| System environment key  | `APPSIGNAL_NGINX_PORT` |
| Required                | no                     |
| Type                    | `Integer`              |
| Default value           | `27649`                |
| Available since version | `1.5.4`                |

### Description

Configure the port on which the NGINX metrics server is exposed.

When AppSignal receives NGINX metrics, it listens on a `localhost`-bound server, by default on port 27649. If you're running several AppSignal-instrumented applications in the same server with NGINX metrics enabled, use this option to configure each application to listen on a different port.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## opentelemetry\_port

<a id="option-opentelemetry_port" />

| Field                   | Value                          |
| ----------------------- | ------------------------------ |
| Config file key         | `opentelemetry_port`           |
| System environment key  | `APPSIGNAL_OPENTELEMETRY_PORT` |
| Required                | no                             |
| Type                    | `Integer`                      |
| Default value           | `8099`                         |
| Available since version | `0.2.2`                        |

### Description

Set this option to configure the OpenTelemetry HTTP server port of the AppSignal agent process. Configure this port if another process is already running on the machine that is also using this port to avoid conflicts.

<Note>
  **Agent only:** when using [an external
  collector](#option-collector_endpoint), this configuration option does not
  have any effect. The port to use to send OpenTelemetry data to the external
  collector can be specified as part of [the `collector_endpoint` configuration
  option](#option-collector_endpoint).
</Note>

## request\_headers

<a id="option-request_headers" />

| Field                   | Value                                                                                                                          |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Config file key         | `request_headers`                                                                                                              |
| System environment key  | `APPSIGNAL_REQUEST_HEADERS`                                                                                                    |
| Required                | no                                                                                                                             |
| Type                    | `list(String)`                                                                                                                 |
| Default value           | `["accept", "accept-charset", "accept-encoding", "accept-language", "cache-control", "connection", "content-length", "range"]` |
| Available since version | `0.1.0`                                                                                                                        |

### Description

The `request_headers` config option contains a list of HTTP request headers which are read and stored by the AppSignal Python package.

This `request_headers` config option is an *allowlist*, which means that it will only take headers as specified by this config option. If this config option is unset it will use the AppSignal default.

Following list is the AppSignal package default.

```python Python theme={null}
# __appsignal__.py
appsignal = Appsignal(
  # ...Other config opts
  request_headers=[
    "accept",
    "accept-charset",
    "accept-encoding",
    "accept-language",
    "cache-control",
    "connection",
    "content-length",
    "range"
  ]
)
```

To customize this list, add the config option with *all headers* you want reported. All header names should be written in lowercase characters. If the header name is `X-Custom-Header`, add it to this list as `x-custom-header`.

To configure AppSignal to not store any HTTP request headers on AppSignal traces, configure the option with an empty list.

```python Python theme={null}
# __appsignal__.py
appsignal = Appsignal(
  # ...Other config opts
  request_headers=[]
)
```

## response\_headers

<a id="option-response_headers" />

| Field                   | Value                        |
| ----------------------- | ---------------------------- |
| Config file key         | `response_headers`           |
| System environment key  | `APPSIGNAL_RESPONSE_HEADERS` |
| Required                | no                           |
| Type                    | `list(String)`               |
| Default value           | `[]`                         |
| Available since version | `1.6.0`                      |

### Description

The `response_headers` config option contains a list of HTTP response headers which are read and stored by the AppSignal for Python package.

This `response_headers` config option is an *allowlist*, which means that it will only take headers as specified by this config option. If this config option is unset, it will not report any response headers.

To customize this list, add the config option with *all headers* you want reported. All header names should be written in lowercase characters. If the header name is `X-Custom-Header`, add it to this list as `x-custom-header`.

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).
</Note>

## revision

<a id="option-revision" />

| Field                   | Value                                                                                                            |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Config file key         | `revision`                                                                                                       |
| System environment key  | `APP_REVISION`                                                                                                   |
| Required                | no                                                                                                               |
| Type                    | `String`                                                                                                         |
| Default value           | nil (This is unset by default)                                                                                   |
| Available since version | `0.1.0`                                                                                                          |
|                         | <ul><li>`0.2.0`: Auto detection for Render deploys.</li><li>`1.3.3`: Auto detection for Kamal deploys.</li></ul> |

### Description

Set the app revision to report 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.

When your application is deployed using Kamal, or when it is deployed to Render, or when it is deployed to Heroku and the [Heroku Labs: Dyno Metadata](https://devcenter.heroku.com/articles/dyno-metadata) feature is enabled, the AppSignal integration will automatically detect the Git commit of the current deployment and use it as the revision.

You can overwrite the automatically detected revisions in Heroku, Render or Kamal by manually setting the `revision` config option to a custom value.

Read more about deploy markers in the [deploy markers topic](/application/markers/deploy-markers).

<Note>
  When using [an external collector](#option-collector_endpoint), the revision
  is not automatically detected. Set this option manually to report the
  currently running version of your app.
</Note>

## running\_in\_container

<a id="option-running_in_container" />

| Field                   | Value                            |
| ----------------------- | -------------------------------- |
| Config file key         | `running_in_container`           |
| System environment key  | `APPSIGNAL_RUNNING_IN_CONTAINER` |
| Required                | no                               |
| Type                    | Boolean (`true` / `false`)       |
| Default value           | detected by agent                |
| Available since version | `0.1.0`                          |

### Description

AppSignal expects to be running on the same machine between different deploys. Set this key to `true` if the application is running in a container, such as with Docker.

Newer versions of the AppSignal integration automatically detect its container environment, so no manual configuration is necessary. If you're having trouble with the automatic detection, please [contact support](mailto:support@appsignal.com).

This option is set to `true` automatically on [Heroku](http://heroku.com/).

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## send\_environment\_metadata

<a id="option-send_environment_metadata" />

| Field                   | Value                                 |
| ----------------------- | ------------------------------------- |
| Config file key         | `send_environment_metadata`           |
| System environment key  | `APPSIGNAL_SEND_ENVIRONMENT_METADATA` |
| Required                | no                                    |
| Type                    | Boolean (`true` / `false`)            |
| Default value           | `true`                                |
| Available since version | `0.1.0`                               |

### Description

Send environment metadata about the app.

For more information please read about [environment metadata](/application/environment-metadata).

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## 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`                               |
| Available since version | `1.6.0`                              |

### Description

Whether to send function parameters to AppSignal.

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).

  See the [send\_params](#option-send_params) configuration
  option for sending data when not using the agent.
</Note>

## send\_params

<a id="option-send_params" />

| Field                   | Value                      |
| ----------------------- | -------------------------- |
| Config file key         | `send_params`              |
| System environment key  | `APPSIGNAL_SEND_PARAMS`    |
| Required                | no                         |
| Type                    | Boolean (`true` / `false`) |
| Default value           | `true`                     |
| Available since version | `0.1.0`                    |

### Description

Whether to skip sending request parameters to AppSignal.

For more information please read about [send\_params](/application/parameter-filtering) in filtering request parameters.

<Note>
  **Agent only:** when using [an external
  collector](#option-collector_endpoint), this configuration option does not
  have any effect.

  See the following configuration options for sending
  parameters when using an external collector:

  * [`send_function_parameters`](#option-send_function_parameters)
  * [`send_request_payload`](#option-send_request_payload)
  * [`send_request_query_parameters`](#option-send_request_query_parameters)
</Note>

## 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`                           |
| Available since version | `1.6.0`                          |

### Description

Whether to send request payload to AppSignal.

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).

  See the [send\_params](#option-send_params) configuration
  option for sending data when not using the agent.
</Note>

## 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`                                    |
| Available since version | `1.6.0`                                   |

### Description

Whether to send request query parameters to AppSignal.

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).

  See the [send\_params](#option-send_params) configuration
  option for sending data when not using the agent.
</Note>

## send\_session\_data

<a id="option-send_session_data" />

| Field                   | Value                         |
| ----------------------- | ----------------------------- |
| Config file key         | `send_session_data`           |
| System environment key  | `APPSIGNAL_SEND_SESSION_DATA` |
| Required                | no                            |
| Type                    | Boolean (`true` / `false`)    |
| Default value           | `true`                        |
| Available since version | `0.1.0`                       |

### Description

Set this option to `false` to not send any session data with exception traces and performance issue samples.

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

## 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           | \`\`                     |
| Available since version | `1.6.0`                  |

### Description

The service name helps AppSignal recognize different services for traces and groups the traces automatically in a namespace based on the service name.

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

<Note>
  **Collector only:** this configuration option will only have an effect when using
  [an external collector](#option-collector_endpoint).
</Note>

## statsd\_port

<a id="option-statsd_port" />

| Field                   | Value                   |
| ----------------------- | ----------------------- |
| Config file key         | `statsd_port`           |
| System environment key  | `APPSIGNAL_STATSD_PORT` |
| Required                | no                      |
| Type                    | `Integer`               |
| Default value           | `8125`                  |
| Available since version | `0.2.2`                 |

### Description

Set this option to configure the StatsD HTTP server port of the AppSignal agent process. Configure this port if another process is already running on the machine that is also using this port to avoid conflicts.

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>

## working\_directory\_path

<a id="option-working_directory_path" />

| Field                   | Value                              |
| ----------------------- | ---------------------------------- |
| Config file key         | `working_directory_path`           |
| System environment key  | `APPSIGNAL_WORKING_DIRECTORY_PATH` |
| Required                | no                                 |
| Type                    | `String`                           |
| Default value           | detected by agent                  |
| Available since version | `0.1.0`                            |

### Description

Override the location where AppSignal for Python can store temporary files. Use this option if the default location is not suitable. See our [how AppSignal operates](/appsignal/how-appsignal-operates) page for more information about the purpose of this working directory.

If you are running multiple applications using AppSignal on the same server, use this configuration option to select different working directories for every AppSignal instance, otherwise the two instances could conflict with one another. For more information on this scenario see our [running multiple applications on one host](/guides/application/multiple-applications-on-one-host) documentation.

```python Python theme={null}
# __appsignal__.py
appsignal = Appsignal(
  # Other config
  working_directory_path="/tmp/project_1"
)
```

<Note>
  **Note**: The specified path cannot contain Operating Specific file system
  abstractions, such as the homedir symbol `~` for \*NIX systems. This will be
  seen as a malformed path.
</Note>

<Note>
  **Agent only:** when using [an external collector](#option-collector_endpoint),
  this configuration option does not have any effect.
</Note>
