Python agent: Runtime configuration
You can change the behavior of each Python agent by changing its runtime configuration in its configuration file.
Runtime configuration file
Each Django application has its own runtime configuration file, which is in the temporary folder for the agent: install_dir/tmp/kpg/plugin_conf_numeric_string.json where install_dir is the Python agent installation directory. The default installation directory is /opt/ibm/apm/agent.
"filters":
[
{
"pattern" : "GET/polls/get_infinite/.*",
"to" : "GET/polls/infinite/123"
}
7
],
"maxRequestSize": 200,
"logLevel": "error"
URL filters
/polls/1/
/polls/2/
/polls/45/
{
pattern : GET/polls/[09]+/,
to : GET/polls/n/
}
With this filter, the sample requests are aggregated as one. The response time, count, and traffic are calculated together. The profiler report is generated for one request and for a collection interval.
You can define as many filters as you require and put them in the array. The first matched filter is used for one request.
Max Request Size
In each Apache working process, for 1 minute, the monitoring middleware remembers as many kinds of URLs as designated by Max Request Size.
Trace Level
Each monitoring middleware component can log messages to its own log file. You can find the messages in the following temp folder: /tmp/kpglogs/kpg_ParentProcessId_ProcessId.log
These log files are rotated if their size reaches 10 MB. One rotation is saved. If you have multiple Django projects, the log file contains messages for all projects.