Python SDK tracing is currently only available in the Beta SDK.
Installation
First, install thescale-gp-beta
package using pip:
Initialisation
Before you can create any traces or spans, you must initialize the tracing SDK. It’s best practice to do this once at your application’s entry point. You have two primary options for initialization:Initialize with an SGPClient
This method gives you full control over the SGPClient
’s configuration (e.g., base_url
, timeout
).
Initialize using Environment Variables
If you have set theSGP_API_KEY
and SGP_ACCOUNT_ID
environment variables, you can omit passing a client. The SDK will automatically attempt to create a default SGPClient
for you.
Disabling Tracing
You can control whether tracing data is collected and exported. This is useful for development, testing, or specific environments where tracing is not desired.Environment Variable
Programmatically
Pass thedisabled=True
parameter directly to the init()
function. This will override the environment variable setting.