Create a key
1
Sign in
Go to cloud.botgauge.com and sign in.
2
Complete onboarding for your workspace
Follow the onboarding prompts for your workspace.
3
Generate a key
Open the project you want to trace into, go to Settings, Project, API keys, and choose Create key. Give it a name that says what uses it, such as
CI - GitHub Actions, then copy the key. It starts with bg_.Put the key where BotGauge looks for it
The SDK andbotgauge instrument both read the key from the BOTGAUGE_API_KEY environment variable. Set it in the shell or deployment that runs your app.
terminal
Using a .env file
BotGauge doesn’t read.env files itself. Load the file before tracing.init(), for example with python-dotenv (pip install python-dotenv).
.env
app.py
load_dotenv() runs too late for it.
terminal
Use the right token
Use the key you generated in the console. BotGauge rejects other tokens with401, including the session token your browser receives when you sign in to the console.
If a key is rejected, the SDK logs a single line on the first 401 or 403, botgauge: BotGauge rejected the API key (401 ...), and keeps your app running. Export happens on a background thread, so a bad key never crashes your application. See Troubleshooting for the full list of messages.
Generate a project key
Open BotGauge to create and copy an API key for your project.
.png?fit=max&auto=format&n=rExdh2xAS2_ywWU5&q=85&s=2336659947d2543be68f95bf2d539b85)