Download PDF
Download page Python Agent Settings.
Python Agent Settings
You can configure operating settings for the Python Agent using a configuration file or by setting environment variables in the application environment. This page lists the Python Agent settings.
See Configure the Agent for information about the configuration file.
Older version of the environment variables are backward compatible and are deprecated which will eventually be removed in future releases. You will have to update the environment variables to the latest version.
The new environment variables take precedence over the deprecated variables in case both are set in an environment (eg. APPDYNAMICS_AGENT_APPLICATION_NAME
takes precedence over the deprecated APPD_APP_NAME
if both are set).
[agent]
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
app | App Name | MyApp | Required | APPDYNAMICS_AGENT_APPLICATION_NAME |
tier | Tier Name | web-fe | Required | APPDYNAMICS_AGENT_TIER_NAME |
node | Node Name | web-fe1 | Required | APPDYNAMICS_AGENT_NODE_NAME |
dir | Base directory for files related to the AppDynamics agent | /mysite/appd/agent/python/ | /tmp/appd/ | APPDYNAMICS_AGENT_BASE_DIR |
nodereuse | Reuse Node Name | true or false | Optional | APPDYNAMICS_AGENT_REUSE_NODE_NAME |
nodereuseprefix | Reuse Node Name Prefix | My Node Name | Optional | APPDYNAMICS_AGENT_REUSE_NODE_NAME_PREFIX |
uniquehostid | Unique host id for the app agents | Optional | APPDYNAMICS_AGENT_UNIQUE_HOST_ID |
[agent:proxy]
Directive | Description | Example | Default |
---|---|---|---|
| APPDYNAMICS_CURVE_ENABLED |
| off |
| APPDYNAMICS_CURVE_ZAP_ENABLED |
| off |
| APPDYNAMICS_CURVE_PUBLIC_KEY_DIR |
|
|
| APPDYNAMICS_CURVE_SECRET_KEY_DIR |
|
|
| APPDYNAMICS_CURVE_AGENT_PUBLIC_KEY_FILE |
|
|
| APPDYNAMICS_CURVE_AGENT_SECRET_KEY_FILE |
|
|
| APPDYNAMICS_CURVE_PROXY_PUBLIC_KEY_FILE |
|
|
| APPDYNAMICS_CURVE_PROXY_SECRET_KEY_FILE |
|
|
[wsgi]
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
script | Path to WSGI script file | /var/www/acme/bookstore.py | n/a | APPDYNAMICS_WSGI_SCRIPT_ALIAS |
callable | Name of WSGI callable in script/module | app | application | APPDYNAMICS_WSGI_CALLABLE_OBJECT |
module | Fully-qualified name of app module | acme.bookstore:app | n/a | APPDYNAMICS_WSGI_MODULE |
If both the script
and module
directives are specified, the module
directive takes precedence.
The module
value may be the fully-qualified name of a module, or it may be the fully-qualified name of a module followed by a colon and the name of the WSGI callable in that module. In the latter form, the module
directive overrides the callable
directive.
Both the long-form of the module
directive and the callable
directive may take either the name of a symbol, or the name of a symbol followed by an empty pair of parentheses. In the latter form, the callable is taken to be the result of calling the callable specified by the directive. This latter form can be used with Django; for example:
module = django.core.handlers.wsgi:WSGIHandler()
[log]
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
dir | The directory to write proxy and agent logs to | /var/log/appdynamics | /tmp/appd/logs | APPDYNAMICS_LOGS_DIR |
level | The level to log at one of: warning, info, or debug | debug | warning | APPDYNAMICS_LOGGING_LEVEL |
debugging | On to write DEBUG level logs to stderr and log files | on | off | APPDYNAMICS_DEBUG_LOG |
[controller]
This section specifies configuration for the AppDynamics Controller.
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
host | Controller host | mycontroller.example.org | Required | APPDYNAMICS_CONTROLLER_HOST_NAME |
port | Controller port | 9000 | 8090 for HTTP on-prem 443 for HTTPS, in which case SSL must also be set | APPDYNAMICS_CONTROLLER_PORT |
ssl | Is SSL set be used to talk to the controller? on or off | on | off | APPDYNAMICS_CONTROLLER_SSL_ENABLED |
account | AppDynamics Controller account | user1 | For a single-tenant controller defaults to customer1 .Otherwise required. | APPDYNAMICS_AGENT_ACCOUNT_NAME |
accesskey | AppDynamics Controller account access key | XC6v2n8m2$543 | Required. To find your account name and access key, click in the upper right corner of the AppDynamics UI, then click License. | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY |
certfile | Controller Certificate
| /tmp/ssl/cacerts | Optional | APPDYNAMICS_CONTROLLER_SSL_CERTFILE |
[controller:http-proxy]
If you need to use an HTTP proxy to talk to your Controller, use this section to configure the HTTP proxy.
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
host | HTTP proxy host | proxy.example.org | n/a | APPDYNAMICS_HTTP_PROXY_HOST |
port | HTTP proxy port | 8090 | 80 | APPDYNAMICS_HTTP_PROXY_PORT |
user | HTTP proxy user | proxyuser | n/a | APPDYNAMICS_HTTP_PROXY_USER |
password-file | HTTP proxy password file | /etc/http-proxy.passwd | n/a | APPDYNAMICS_HTTP_PROXY_PASSWORD_FILE |
[proxy]
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
max-heap-size | Max heap size for proxy | 450m | 300m | APPDYNAMICS_MAX_HEAP_SIZE |
min-heap-size | Min heap size for proxy | 100m | 50m | APPDYNAMICS_MIN_HEAP_SIZE |
max-perm-size | Max permanent generation size | 150m | 120m | APPDYNAMICS_MAX_PERM_SIZE |
proxy-debug-port | Port number to which to attach the JAVA debugger | 8092 | None | APPDYNAMICS_PROXY_DEBUG_PORT |
start-suspended | Specifies whether to debug proxy startup with a JAVA debugger. | on | off | APPDYNAMICS_START_SUSPENDED |
debug-opt | Specifies the debug opt for debugging | -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8090 | None | APPDYNAMICS_DEBUG_OPT |
agent | Specifies the Agent type (Eg PYTHON_APP_AGENT, NODEJS_APP_AGENT etc) | NODEJS_APP_AGENT | PYTHON_AGENT | APPDYNAMICS_AGENT_TYPE |
tcp-comm-host | Host over which the agent-proxy TCP communication takes place | 127.0.0.1 | Default |
|
tcp-comm-port | Port over which initial communication requests between the agent and proxy occurs | 8080 | None |
|
tcp-reporting-port | Port for reporting transport (Agent only property) | 10010 | None |
|
tcp-request-port | Port for request and config transport (Agent only property) | 10011 | None |
|
tcp-port-range | Port range to allocate request and report port for agents (Proxy only property) | 10000-10100 | None | APPDYNAMICS_TCP_PORT_RANGE |
If PROXY_DEBUG_PORT
is defined, then -agentlib:jdwp=transport=dt_socket,server=y,suspend=${START_SUSPENDED},address=${PROXY_DEBUG_PORT}
is used as the debug opt. PROXY_DEBUG_PORT
takes priority over DEBUG_OPT
if both are specified. Also ensure that PROXY_DEBUG_PORT
is not set if you want to use a self defined DEBUG_OPT
.
[eum]
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
disable-cookie | If set, the agent does not add EUM correlation data to WSGI response headers. | on | off | APPDYNAMICS_EUM_DISABLE_COOKIE |
user-agent-allowlist | If specified overwrites the default allowlist for user agent added as EUM correlation data headers Use this setting to specify alternate user agents as a comma separated list. Use '*' to allow all user agents. | 'iPad, Android' |
| APPDYNAMICS_EUM_USER_AGENT_ALLOWLIST |
[services:snapshot]
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
exit-call-details-length | Specifies the number of characters in the details string describing exit calls in transaction snapshots. | 200 | 100 | APPDYNAMICS_EXIT_CALL_DETAILS_LENGTH |
[services:transaction-monitor]
Directive | Description | Example | Default | Environment Variable |
---|---|---|---|---|
bt-max-duration-ms | Maximum duration of a business transaction in milliseconds. | 60000 | 120000 | APPDYNAMICS_BT_MAX_DURATION_MS |