Standalone Monitoring Setup
Standalone Python refers to an independent executable process where a pure .py script runs directly through the Python interpreter without a web framework or runtime environment.
In this non-HTTP environment, monitoring must be configured via options in the whatap.conf file.
-
standalone_enabled Boolean
Default:
falseStandalone monitoring is only available when this option is set to
trueinwhatap.conf.
Standalone Type Setting
-
standalone_type String
Default:
single-transactionChoose one of:
single-transaction,multiple-transaction-
single-transaction- Monitors the execution of the Python script as a single transaction.
- The service name is registered using the name of the executed script file.
whatap-start-agent test.py
# → Registered as transaction name "test.py" -
multiple-transaction- Tracks transactions by setting points at the user-specified module, class, or method level.
Tracking by classstandalone_transaction_patterns = "package:Class.method"
# Example: myPackage:MyClass.__init__Tracking by functionstandalone_transaction_patterns = "package:function"
# Example: myPackage:my_function
TipWhen tracking functions or classes in the main script file, use
__main__instead of the package name.- Python interpreter always recognizes the main script as the
__main__module.
Examplewhatap-start-agent test.py- In this case, the script test.py will be recognized as the
__main__module.
# Correct example
standalone_transaction_patterns = "__main__:my_function"
# Incorrect example
standalone_transaction_patterns = "test:my_function" -