Basic programmatic configuration
- Python
- TypeScript
Python
Precedence rules
Parameters passed toinit always take precedence over environment variables:
Python
- Explicit keyword arguments to
pandaprobe.init() PANDAPROBE_*environment variables- SDK defaults
SdkConfig fields
The resolved configuration is stored as a frozenSdkConfig dataclass. You can inspect it via the client:
Python
The equivalent TypeScript
SdkConfig fields are apiKey, projectName, endpoint, environment, release, enabled, batchSize, flushInterval, maxQueueSize, and debug.
Re-initialization
Callingpandaprobe.init() when a client already exists shuts down the previous client and creates a new one:
Python
TypeScript
Auto-initialization
If you don’t callpandaprobe.init(), the SDK auto-initializes from environment variables on first use:
Python
get_client() return None and convenience functions like flush() and shutdown() silently no-op.
TypeScript also auto-initializes once on first use. If initialization fails, getClient() returns null; flush(), shutdown(), and score() safely no-op until init() is called.
