Skip to main content

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: false

    Standalone monitoring is only available when this option is set to true in whatap.conf.

Standalone Type Setting

  • standalone_type String

    Default: single-transaction

    Choose 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 class
      standalone_transaction_patterns = "package:Class.method"
      # Example: myPackage:MyClass.__init__
      Tracking by function
      standalone_transaction_patterns = "package:function"
      # Example: myPackage:my_function
    Tip

    When 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.
    Example
    whatap-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"