# Settings overview

### Agent Configuration

The RevDeBug Python configuration is first read from an optional revdebug.cfg file in the current working directory of your application. Those settings can be set or overridden through environment variables.

Then the script base directory is checked for the file again and if it is present it is read and overrides any settings from the previous file (if one was read). Finally, environment variables are checked and override anything which may have come from a config file.&#x20;

The config file options (case insensitive) are as follows:

<table><thead><tr><th align="center"> revdebug.cfg</th><th width="186" align="center">Environment variables</th><th>Description</th><th align="center">Default</th></tr></thead><tbody><tr><td align="center">host</td><td align="center">REVDEBUG_HOST</td><td>RevDeBug server address</td><td align="center">127.0.0.1</td></tr><tr><td align="center">port</td><td align="center">REVDEBUG_PORT</td><td></td><td align="center">42734</td></tr><tr><td align="center">force_tls</td><td align="center">REVDEBUG_FORCE_TLS</td><td>Whether the RevDeBug server uses a secure connection</td><td align="center">0</td></tr><tr><td align="center">conn_timeout</td><td align="center">REVDEBUG_CONN_TIMEOUT</td><td>Connection timeout in seconds</td><td align="center">4</td></tr><tr><td align="center">reconn_wait</td><td align="center">REVDEBUG_RECONN_WAIT</td><td>Maximum wait before reconnect attempt (reached with exponential backoff)</td><td align="center">60</td></tr><tr><td align="center">auth</td><td align="center">REVDEBUG_AUTH</td><td>Authentication token for server access</td><td align="center"></td></tr><tr><td align="center">solution</td><td align="center">REVDEBUG_SOLUTION</td><td>Name of the application that will be displayed in the RevDeBug server</td><td align="center">Solution_Name</td></tr><tr><td align="center">application</td><td align="center">REVDEBUG_APPLICATION</td><td>If this is not present then Application is set to script name</td><td align="center">App_Name</td></tr><tr><td align="center">release</td><td align="center">REVDEBUG_RELEASE</td><td>Should be set to a git hash of current release commit</td><td align="center"></td></tr><tr><td align="center">version</td><td align="center">REVDEBUG_VERSION</td><td>Human readable version string, e.g. "1.0", etc...)</td><td align="center"></td></tr><tr><td align="center">logging</td><td align="center">REVDEBUG_LOGGING</td><td>Logging level: info, warn, error, off)</td><td align="center">warn</td></tr><tr><td align="center">recordings</td><td align="center">REVDEBUG_RECORDINGS</td><td>Maximum number of concurrent pending recordings sending to allow</td><td align="center">256</td></tr><tr><td align="center">blocks</td><td align="center">REVDEBUG_BLOCKS</td><td>Whether async task code isolation blocks are enabled or no, will allow giving async tasks contexts their own record buffers so their crash recordings will not include non-task code, default enabled</td><td align="center">1</td></tr><tr><td align="center">mode</td><td align="center">REVDEBUG_MODE</td><td>Can be "Continuous", "OnEvent" or "Off" (case insensitive) (if mode is off then can not be enabled from remote server and just acts like normal Python).</td><td align="center">OnEvent</td></tr><tr><td align="center">reprlevel</td><td align="center">REVDEBUG_REPR_LEVEL</td><td>0 .. 2, 0 = fastest least detail, 1 = fast know type stringifiers and repr for others, 2 = same as 1 but known mutable objects are shown with repr if Mutable flag not set (dangerous because value may not be correct)</td><td align="center">0</td></tr><tr><td align="center">mutable</td><td align="center">REVDEBUG_MUTABLE</td><td>0 or 1, if set then tuples, lists, dicts, sets and bytearrays will be stringified immediately on record to be able to display the correct value at point of record</td><td align="center">1</td></tr><tr><td align="center">depth</td><td align="center">REVDEBUG_DEPTH</td><td>maximum depth to recurse into objects for stringification, range [-1, 16]</td><td align="center">1</td></tr><tr><td align="center">apm</td><td align="center">REVDEBUG_APM</td><td>0 or 1, whether APM is enabled or not</td><td align="center">1</td></tr><tr><td align="center">apm_port</td><td align="center">REVDEBUG_APM_PORT</td><td>port of APM OAP server, 0 means default port for protocol - grpc: 11800, http: 80 or 443</td><td align="center">11800</td></tr><tr><td align="center">exc_rec_http_in</td><td align="center">REVDEBUG_EXC_REC_HTTP_IN</td><td>http status codes to be excluded from auto exception recordings for servers (span will still be recorded)</td><td align="center"></td></tr><tr><td align="center">exc_rec_http_out</td><td align="center">REVDEBUG_EXC_REC_HTTP_OUT</td><td>http status codes to be excluded from auto exception recordings for clients (span will still be recorded)</td><td align="center"></td></tr><tr><td align="center">sw_agent_name</td><td align="center">SW_AGENT_NAME</td><td>Application name as will be displayed in APM RevDeBug. Empty inherits from solution</td><td align="center"></td></tr><tr><td align="center">sw_agent_disable_plugins</td><td align="center">SW_AGENT_DISABLE_PLUGINS</td><td>The name patterns in CSV pattern, plugins whose name matches one of the pattern won't be installed</td><td align="center"></td></tr><tr><td align="center">sw_ignore_suffix</td><td align="center">SW_IGNORE_SUFFIX</td><td>If the operation name of the first span is included in this set, this segment should be ignored.</td><td align="center">.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg</td></tr><tr><td align="center">sw_trace_ignore_path</td><td align="center">SW_TRACE_IGNORE_PATH</td><td>You can setup multiple URL path patterns, The endpoints match these patterns wouldn't be traced. the current matching rules follow Ant Path match style , like /path/*, /path/**, /path/?.</td><td align="center"></td></tr><tr><td align="center">sw_agent_max_buffer_size</td><td align="center">SW_AGENT_MAX_BUFFER_SIZE</td><td>The maximum queue backlog size for sending the segment data to backend, segments beyond this are silently dropped</td><td align="center">10000</td></tr><tr><td align="center">sw_http_ignore_method</td><td align="center">SW_HTTP_IGNORE_METHOD</td><td>Comma-delimited list of http methods to ignore (GET, POST, HEAD, OPTIONS, etc...)</td><td align="center"></td></tr><tr><td align="center">record</td><td align="center">REVDEBUG_RECORD</td><td>':' delimited list of absolute or relative (to .cfg) paths or files to enable or disable recording (using '+' or '-' prefix, no prefix is same as '+').</td><td align="center"></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://revdebug.gitbook.io/revdebug/supported-langauges/python/settings-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
