What install() connects to

The SDK reaches two hosts, which matters if you allow-list outbound traffic. It POSTs masked captures to https://ingest.stubsmith.dev/v1/captures, and it polls https://app.stubsmith.dev/api/v1/sdk/sync for your masking rules every 60 seconds by default (rules_poll_interval). Both are overridable with the url and backend_url arguments. It starts two daemon threads, stubsmith-sender and stubsmith-rules-cache. Those names are Python-level only: CPython does not set the operating system's thread name, so a native thread dump or /proc/<pid>/task/*/comm shows python for both. Read threading.enumerate() to see them, or better, call stubsmith.is_installed() to check that capture is armed.

If the rules API is unreachable, capture fails closed and degrades to full masking: the last known-good rules stay in effect, and a client that has never reached the API masks everything and keeps delivering captures. You get fully masked payloads marked novel, never silence and never cleartext. Use stubsmith.is_installed() to assert in your own code that capture is armed.

A rejected key is different. The SDK takes the project key from the api_key argument (apiKey in the Node SDK) or from the STUBSMITH_API_KEY environment variable. If the key is wrong or revoked, the ingest service refuses it as well as the rules API, so nothing is recorded. From Python SDK 0.9.1 and Node SDK 0.2.2, the first 401 or 403 logs one warning per process, without debug mode, and the warning never contains the key. Your application's requests and responses are unaffected.

Under a pre-fork server (gunicorn --preload, uWSGI, Celery, Odoo), call install() wherever is convenient: the client re-arms itself in each forked child, and repeated calls return the client already installed rather than starting more threads. Both properties require SDK version 0.2.0 or later; on 0.1.0, install once per worker instead.