> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pandaprobe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

> Complete reference for all PandaProbe SDK environment variables

All PandaProbe SDK behavior can be configured via environment variables. These are read at client initialization time.

| Variable | Type | Default | Required | Description |
| - | - | - | - | - |
| `PANDAPROBE_API_KEY` | `string` | — | Yes | Your PandaProbe API key. Required when the SDK is enabled. |
| `PANDAPROBE_PROJECT_NAME` | `string` | — | Yes | The project name to associate traces with. Required when the SDK is enabled. |
| `PANDAPROBE_ENDPOINT` | `string` | `https://api.pandaprobe.com` | No | The PandaProbe backend URL. Change this for self-hosted deployments. |
| `PANDAPROBE_ENVIRONMENT` | `string` | `None` | No | Environment tag attached to all traces (for example, `production`, `staging`, `development`). |
| `PANDAPROBE_RELEASE` | `string` | `None` | No | Release or version tag attached to all traces (for example, `v1.2.3`, a git SHA). |
| `PANDAPROBE_ENABLED` | `boolean` | `true` | No | Set to `false` to completely disable the SDK. All operations become no-ops. Accepted values: `true`, `1`, `yes` (enabled) or any other value (disabled). |
| `PANDAPROBE_BATCH_SIZE` | `integer` | `10` | No | Number of items per flush batch sent to the backend. |
| `PANDAPROBE_FLUSH_INTERVAL` | `float` | `5.0` | No | Seconds between automatic background flushes. |
| `PANDAPROBE_MAX_QUEUE_SIZE` | `integer` | `1000` | No | Maximum number of items in the send queue. When full, the oldest item is dropped with a warning log. |
| `PANDAPROBE_DEBUG` | `boolean` | `false` | No | Enable verbose debug logging. Sets the `pandaprobe` logger to DEBUG level. Useful for troubleshooting. |

### Setting environment variables

```bash title="Bash" theme={null}
export PANDAPROBE_API_KEY="pk_..."
export PANDAPROBE_PROJECT_NAME="my-project"
export PANDAPROBE_ENDPOINT="https://your-instance.com"
export PANDAPROBE_ENVIRONMENT="production"
```

```text title=".env" theme={null}
PANDAPROBE_API_KEY=pk_...
PANDAPROBE_PROJECT_NAME=my-project
PANDAPROBE_ENDPOINT=https://your-instance.com
PANDAPROBE_ENVIRONMENT=production
```

```python title="Python" theme={null}
from dotenv import load_dotenv
load_dotenv()

import pandaprobe
# SDK auto-initializes from environment variables
```

```ts title="TypeScript" theme={null}
import { getClient } from "pandaprobe";

// Export variables in the shell or load a .env file before first use.
const client = getClient();
```

> [!NOTE]
>
> Python reads variables from `os.environ`; TypeScript reads them from `process.env`. Values are resolved at client initialization, so later environment changes have no effect. Re-run Python's `pandaprobe.init(...)` or TypeScript's `init({...})` to reconfigure.

### Boolean parsing

Boolean environment variables (`PANDAPROBE_ENABLED`, `PANDAPROBE_DEBUG`) accept `true`, `1`, or `yes` (case-insensitive) as truthy. All other values are treated as falsy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.