Skip to main content
The Arzule SDK is configured primarily through environment variables. This provides a secure, consistent way to manage credentials across environments.

Required variables

These must be set for the SDK to send traces to Arzule:
VariableDescription
ARZULE_API_KEYYour API key for authentication
ARZULE_TENANT_IDYour tenant identifier
ARZULE_PROJECT_IDThe project to associate traces with
You can find these credentials in your Arzule dashboard settings. Generate a new API key if you don’t have one.

Optional variables

VariableDescriptionDefault
ARZULE_INGEST_URLIngest endpoint URLhttps://ingest.arzule.com
ARZULE_BATCH_SIZENumber of events per batch100
ARZULE_FLUSH_INTERVALSeconds between batch flushes5
ARZULE_REDACT_SECRETSEnable PII/secret redactiontrue
ARZULE_DEBUGEnable debug loggingfalse

Setting environment variables

Shell (temporary)

export ARZULE_API_KEY="arz_live_abc123..."
export ARZULE_TENANT_ID="550e8400-e29b-41d4-a716-446655440000"
export ARZULE_PROJECT_ID="660e8400-e29b-41d4-a716-446655440000"

.env file

Create a .env file in your project root:
ARZULE_API_KEY=arz_live_abc123...
ARZULE_TENANT_ID=550e8400-e29b-41d4-a716-446655440000
ARZULE_PROJECT_ID=660e8400-e29b-41d4-a716-446655440000
Load it with python-dotenv:
from dotenv import load_dotenv
load_dotenv()

import arzule_ingest
arzule_ingest.init()
Never commit .env files to version control. Add .env to your .gitignore.

Docker

ENV ARZULE_API_KEY=arz_live_abc123...
ENV ARZULE_TENANT_ID=550e8400-e29b-41d4-a716-446655440000
ENV ARZULE_PROJECT_ID=660e8400-e29b-41d4-a716-446655440000
Or pass at runtime:
docker run -e ARZULE_API_KEY=... -e ARZULE_TENANT_ID=... your-image

Kubernetes

apiVersion: v1
kind: Secret
metadata:
  name: arzule-credentials
type: Opaque
stringData:
  api-key: "arz_live_abc123..."
---
apiVersion: apps/v1
kind: Deployment
spec:
  template:
    spec:
      containers:
        - name: app
          env:
            - name: ARZULE_API_KEY
              valueFrom:
                secretKeyRef:
                  name: arzule-credentials
                  key: api-key
            - name: ARZULE_TENANT_ID
              value: "550e8400-e29b-41d4-a716-446655440000"
            - name: ARZULE_PROJECT_ID
              value: "660e8400-e29b-41d4-a716-446655440000"

Programmatic override

Environment variables can be overridden in code:
import arzule_ingest

arzule_ingest.init(
    api_key="override-key",  # Overrides ARZULE_API_KEY
    batch_size=50,           # Overrides ARZULE_BATCH_SIZE
    redact_secrets=False,    # Overrides ARZULE_REDACT_SECRETS
)

Environment-specific configuration

Use different credentials per environment:
# development
export ARZULE_PROJECT_ID="dev-project-id"

# staging
export ARZULE_PROJECT_ID="staging-project-id"

# production
export ARZULE_PROJECT_ID="prod-project-id"
This keeps traces separated by environment while using the same codebase.

Verifying configuration

Check your configuration is correct:
import os

# Print current config (redact the key in logs)
print(f"Tenant: {os.getenv('ARZULE_TENANT_ID')}")
print(f"Project: {os.getenv('ARZULE_PROJECT_ID')}")
print(f"API Key set: {bool(os.getenv('ARZULE_API_KEY'))}")

Next steps