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.
The config file options (case insensitive) are as follows:
revdebug.cfg | Environment variables | Description | Default |
---|---|---|---|
host | REVDEBUG_HOST | RevDeBug server address | 127.0.0.1 |
port | REVDEBUG_PORT | 42734 | |
force_tls | REVDEBUG_FORCE_TLS | Whether the RevDeBug server uses a secure connection | 0 |
conn_timeout | REVDEBUG_CONN_TIMEOUT | Connection timeout in seconds | 4 |
reconn_wait | REVDEBUG_RECONN_WAIT | Maximum wait before reconnect attempt (reached with exponential backoff) | 60 |
auth | REVDEBUG_AUTH | Authentication token for server access | |
solution | REVDEBUG_SOLUTION | Name of the application that will be displayed in the RevDeBug server | Solution_Name |
application | REVDEBUG_APPLICATION | If this is not present then Application is set to script name | App_Name |
release | REVDEBUG_RELEASE | Should be set to a git hash of current release commit | |
version | REVDEBUG_VERSION | Human readable version string, e.g. "1.0", etc...) | |
logging | REVDEBUG_LOGGING | Logging level: info, warn, error, off) | warn |
recordings | REVDEBUG_RECORDINGS | Maximum number of concurrent pending recordings sending to allow | 256 |
blocks | REVDEBUG_BLOCKS | 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 | 1 |
mode | REVDEBUG_MODE | 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). | OnEvent |
reprlevel | REVDEBUG_REPR_LEVEL | 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) | 0 |
mutable | REVDEBUG_MUTABLE | 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 | 1 |
depth | REVDEBUG_DEPTH | maximum depth to recurse into objects for stringification, range [-1, 16] | 1 |
apm | REVDEBUG_APM | 0 or 1, whether APM is enabled or not | 1 |
apm_port | REVDEBUG_APM_PORT | port of APM OAP server, 0 means default port for protocol - grpc: 11800, http: 80 or 443 | 11800 |
exc_rec_http_in | REVDEBUG_EXC_REC_HTTP_IN | http status codes to be excluded from auto exception recordings for servers (span will still be recorded) | |
exc_rec_http_out | REVDEBUG_EXC_REC_HTTP_OUT | http status codes to be excluded from auto exception recordings for clients (span will still be recorded) | |
sw_agent_name | SW_AGENT_NAME | Application name as will be displayed in APM RevDeBug. Empty inherits from solution | |
sw_agent_disable_plugins | SW_AGENT_DISABLE_PLUGINS | The name patterns in CSV pattern, plugins whose name matches one of the pattern won't be installed | |
sw_ignore_suffix | SW_IGNORE_SUFFIX | If the operation name of the first span is included in this set, this segment should be ignored. | .jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg |
sw_trace_ignore_path | SW_TRACE_IGNORE_PATH | 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/?. | |
sw_agent_max_buffer_size | SW_AGENT_MAX_BUFFER_SIZE | The maximum queue backlog size for sending the segment data to backend, segments beyond this are silently dropped | 10000 |
sw_http_ignore_method | SW_HTTP_IGNORE_METHOD | Comma-delimited list of http methods to ignore (GET, POST, HEAD, OPTIONS, etc...) | |
record | REVDEBUG_RECORD | ':' delimited list of absolute or relative (to .cfg) paths or files to enable or disable recording (using '+' or '-' prefix, no prefix is same as '+'). |
Last updated