NeatlogsNeatlogs

FAQ

Frequently asked questions and common troubleshooting tips.

My traces are not showing up in the dashboard

The most common cause is that neatlogs.init() silently disabled export because it couldn't find your API key.

How it happens

When neatlogs.init() runs without a valid API key, it automatically disables data export internally. Your code still runs normally — spans are created, decorators work, logs are captured — but nothing is sent to the backend. There is no error by default, so it's easy to miss.

# This silently disables export (no key provided, no env var set)
neatlogs.init()

How to fix it

Option 1: Set the environment variable (recommended)

export NEATLOGS_API_KEY="your-project-api-key"

Then call init() without the api_key argument — it picks up the env var automatically:

neatlogs.init()

This is the recommended approach because it keeps secrets out of your code and works consistently across local development, CI, and production environments.

Option 2: Use a .env file (with python-dotenv or similar)

# .env
NEATLOGS_API_KEY=your-project-api-key
from dotenv import load_dotenv
load_dotenv()

neatlogs.init()

Option 3: Pass the key directly

neatlogs.init(api_key="your-project-api-key")

Avoid hardcoding the key in source code — use this only for quick local testing.

How to confirm export is working

Enable debug mode to see what's happening:

neatlogs.init(debug=True)

With debug=True, if the key is missing you'll see:

WARNING - No NEATLOGS_API_KEY set; HTTP export disabled. Set NEATLOGS_API_KEY (or pass api_key=) to send spans to the backend.

Once the key is set correctly and debug=True is enabled, you'll see log output confirming spans are being batched and exported.