# Troubleshooting

Fix common setup and ingestion issues quickly.

Common issues and how to resolve them.

## Missing Sessions or Traces

If you don't see data in the dashboard:

1. **Check API Key**: Ensure your `BRIZZ_API_KEY` is correct and has write permissions.
2. **Check Environment**: Ensure you are running in a server environment (Node.js/Python), not a browser.
3. **Check Initialization Order**:
   - **Python**: `Brizz.initialize()` must run **before** `import openai`.
   - **Node.js**: `Brizz.initialize()` must run before your app makes any AI call, and every AI library you use must be listed in `instrumentModules`.
4. **Wait**: Data ingestion can take a few seconds.

## "Module loaded before instrumentation" (Node.js)

This warning means an AI library (like `openai`) was imported before Brizz could instrument it.

**Fix:**
- Move `Brizz.initialize()` to the very top of your entry file.
- Pass the library to `instrumentModules` so Brizz hooks it regardless of import order — see the [Node.js SDK docs](/docs/sdks/typescript.md#initialization).

## Vercel AI SDK Not Tracking

If using the Vercel AI SDK (`ai` package), you must explicitly enable telemetry.

**Fix:**
Add `experimental_telemetry: { isEnabled: true }` to your `generateText` or `streamText` calls.

## Authentication Errors (401)

- Verify your API key is valid.
- Ensure you are not stripping the `Authorization` header in a proxy or firewall.

## Debugging

Enable debug logging to see what the SDK is doing.

**Node.js**:
```bash
BRIZZ_LOG_LEVEL=debug node ...
```

**Python**:
Configure standard Python logging to `DEBUG` level for the `brizz` logger.

## Still Stuck?

Contact us at [support@brizz.ai](mailto:support@brizz.ai).

## See also

- [Verify it landed](/docs/get-started/verify.md) — the original checklist for confirming a trace arrived.
- [Glossary](/docs/help/glossary.md) — definitions for terms used in error messages.
- [Node.js / TypeScript SDK](/docs/sdks/typescript.md) and [Python SDK](/docs/sdks/python.md) — initialization order details per language.
