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]

DirectiveDescriptionExampleDefaultEnvironment Variable
appApp NameMyAppRequiredAPPDYNAMICS_AGENT_APPLICATION_NAME
tierTier Nameweb-feRequiredAPPDYNAMICS_AGENT_TIER_NAME
nodeNode Nameweb-fe1RequiredAPPDYNAMICS_AGENT_NODE_NAME
dirBase directory for files related to the AppDynamics agent/mysite/appd/agent/python//tmp/appd/APPDYNAMICS_AGENT_BASE_DIR
nodereuseReuse Node Nametrue or falseOptionalAPPDYNAMICS_AGENT_REUSE_NODE_NAME
nodereuseprefixReuse Node Name PrefixMy Node NameOptionalAPPDYNAMICS_AGENT_REUSE_NODE_NAME_PREFIX
uniquehostidUnique host id for the app agents
OptionalAPPDYNAMICS_AGENT_UNIQUE_HOST_ID

[agent:proxy]

DirectiveDescriptionExampleDefault

curve-enabled

APPDYNAMICS_CURVE_ENABLED

on

off

curve-zap-enabled

APPDYNAMICS_CURVE_ZAP_ENABLED

on

off

curve-public-dir

APPDYNAMICS_CURVE_PUBLIC_KEY_DIR

/tmp/certificates

/tmp/appd/certs/public

curve-secret-dir

APPDYNAMICS_CURVE_SECRET_KEY_DIR

/tmp/secret-certificates

/tmp/appd/certs/secret

curve-agent-public-file

APPDYNAMICS_CURVE_AGENT_PUBLIC_KEY_FILE

/tmp/certs/agent.key

/tmp/appd/certs/public/<node_name>.key

curve-agent-secret-file

APPDYNAMICS_CURVE_AGENT_SECRET_KEY_FILE

/tmp/certs/agent.key_secret

/tmp/appd/certs/secret/<node_name>.key_secret

curve-proxy-public-file

APPDYNAMICS_CURVE_PROXY_PUBLIC_KEY_FILE

/tmp/certs/proxy.key

/tmp/appd/certs/public/proxy.key

curve-proxy-secret-file

APPDYNAMICS_CURVE_PROXY_SECRET_KEY_FILE

/tmp/certs/proxy.key_secret

/tmp/appd/certs/secret/proxy.key_secret

[wsgi]

DirectiveDescriptionExampleDefaultEnvironment Variable
scriptPath to WSGI script file/var/www/acme/bookstore.pyn/aAPPDYNAMICS_WSGI_SCRIPT_ALIAS
callableName of WSGI callable in script/moduleappapplicationAPPDYNAMICS_WSGI_CALLABLE_OBJECT
moduleFully-qualified name of app moduleacme.bookstore:appn/aAPPDYNAMICS_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]

DirectiveDescriptionExampleDefaultEnvironment Variable
dirThe directory to write proxy and agent logs to/var/log/appdynamics/tmp/appd/logsAPPDYNAMICS_LOGS_DIR
levelThe level to log at one of: warning, info, or debugdebugwarningAPPDYNAMICS_LOGGING_LEVEL
debuggingOn to write DEBUG level logs to stderr and log filesonoffAPPDYNAMICS_DEBUG_LOG

[controller]

This section specifies configuration for the AppDynamics Controller.

DirectiveDescriptionExampleDefaultEnvironment Variable
hostController hostmycontroller.example.orgRequiredAPPDYNAMICS_CONTROLLER_HOST_NAME
portController port9000

8090 for HTTP on-prem

443 for HTTPS, in which case SSL must also be set

APPDYNAMICS_CONTROLLER_PORT
sslIs SSL set be used to talk to the controller? on or offonoffAPPDYNAMICS_CONTROLLER_SSL_ENABLED
accountAppDynamics Controller accountuser1For a single-tenant controller defaults to customer1.
Otherwise required.
APPDYNAMICS_AGENT_ACCOUNT_NAME
accesskeyAppDynamics Controller account access keyXC6v2n8m2$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

  • This certfile must be the default agent keystore (found under site-packages/appdynamics_proxysupport/lib/security/cacerts) with necessary additional .pem/.crt certs embedded within it using keytool.
  • Java proxy supports only .jks and .pkcs12 formats in the keystore. If you want to include .crt format in Java proxy, run the following command:

    keytool -import -alias rootCA -file /etc/ssl/certs/ca-certificates.crt -keystore cacerts.jks -storepass changeit



/tmp/ssl/cacerts
OptionalAPPDYNAMICS_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.

DirectiveDescriptionExampleDefaultEnvironment Variable
hostHTTP proxy hostproxy.example.orgn/aAPPDYNAMICS_HTTP_PROXY_HOST
portHTTP proxy port809080APPDYNAMICS_HTTP_PROXY_PORT
userHTTP proxy userproxyusern/aAPPDYNAMICS_HTTP_PROXY_USER
password-fileHTTP proxy password file/etc/http-proxy.passwdn/aAPPDYNAMICS_HTTP_PROXY_PASSWORD_FILE

[proxy]

Directive

Description

Example

Default

Environment Variable

max-heap-sizeMax heap size for proxy 450m300mAPPDYNAMICS_MAX_HEAP_SIZE
min-heap-sizeMin heap size for proxy 100m50mAPPDYNAMICS_MIN_HEAP_SIZE
max-perm-sizeMax permanent generation size 150m120mAPPDYNAMICS_MAX_PERM_SIZE
proxy-debug-portPort number to which to attach the JAVA debugger8092NoneAPPDYNAMICS_PROXY_DEBUG_PORT
start-suspendedSpecifies whether to debug proxy startup with a JAVA debugger.onoffAPPDYNAMICS_START_SUSPENDED
debug-optSpecifies the debug opt for debugging-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8090NoneAPPDYNAMICS_DEBUG_OPT
agentSpecifies the Agent type (Eg PYTHON_APP_AGENT, NODEJS_APP_AGENT etc)NODEJS_APP_AGENTPYTHON_AGENTAPPDYNAMICS_AGENT_TYPE
tcp-comm-hostHost over which the agent-proxy TCP communication takes place127.0.0.1Default

APPDYNAMICS_TCP_COMM_HOST

tcp-comm-portPort over which initial communication requests between the agent and proxy occurs8080None

APPDYNAMICS_TCP_COMM_PORT

tcp-reporting-portPort for reporting transport (Agent only property)10010None

APPDYNAMICS_TCP_REPORTING_PORT

tcp-request-portPort for request and config transport (Agent only property)10011None

APPDYNAMICS_TCP_REQUEST_PORT

tcp-port-rangePort range to allocate request and report port for agents (Proxy only property)10000-10100NoneAPPDYNAMICS_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]

DirectiveDescriptionExampleDefaultEnvironment Variable
disable-cookieIf set, the agent does not add EUM correlation data to WSGI response headers.onoffAPPDYNAMICS_EUM_DISABLE_COOKIE
user-agent-allowlistIf 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'

'Mozilla, Opera, WebKit, Nokia'

APPDYNAMICS_EUM_USER_AGENT_ALLOWLIST

[services:snapshot]

DirectiveDescriptionExampleDefaultEnvironment Variable
exit-call-details-length
Specifies the number of characters in the details string describing exit calls in transaction snapshots.
200100APPDYNAMICS_EXIT_CALL_DETAILS_LENGTH

[services:transaction-monitor]

DirectiveDescriptionExampleDefaultEnvironment Variable
bt-max-duration-msMaximum duration of a business transaction in milliseconds.60000120000APPDYNAMICS_BT_MAX_DURATION_MS