Documentation Index
Fetch the complete documentation index at: https://docs.bentolabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
Nothing shows up in the dashboard
Walk this list top to bottom. The fix is almost always one of these five.1. Did you call flush() before exit?
1. Did you call flush() before exit?
os._exit(), a Lambda timeout, or a script ending right after track_ai, the daemon worker is killed before its next 5-second tick and the queue is lost.atexit runs the shutdown automatically.2. Is BENTOLABS_API_KEY set in the running process?
2. Is BENTOLABS_API_KEY set in the running process?
~/.zshrc doesn’t help if your IDE or CI launched the process from a different env. Verify inside the process:bl_pk_. The SDK raises BentoAuthError("invalid_api_key_format") on construction otherwise.3. Is BENTOLABS_BASE_URL pointing at the wrong host?
3. Is BENTOLABS_BASE_URL pointing at the wrong host?
https://api.bentolabs.ai. If you set this for local dev and forgot to unset it in production, your spans go nowhere.4. Is the daemon worker actually running?
4. Is the daemon worker actually running?
init() failed silently (suppressed exception in user code) or you’re calling SDK functions before init resolved.5. Are spans being dropped?
5. Are spans being dropped?
Fields look wrong in the dashboard
provider column is empty
provider column is empty
provider="anthropic" (or openai, google, aws_bedrock, etc.) on every track_ai call. See Attributes.Conversations appear as N separate rows
Conversations appear as N separate rows
convo_id. Add the same convo_id to every turn in a conversation, including assistant messages and tool calls.User filter doesn't work
User filter doesn't work
user_id is missing, or you’re passing it as a property (properties={"user_id": ...}). It must be the top-level user_id= kwarg so it lands on gen_ai.user.id.Bedrock model shows up under 'anthropic' instead of 'aws_bedrock'
Bedrock model shows up under 'anthropic' instead of 'aws_bedrock'
anthropic.claude-3-sonnet-20240229-v1:0) look like Anthropic to us but route through AWS. Pass provider="aws_bedrock" explicitly.Custom properties show as strings even when I passed ints
Custom properties show as strings even when I passed ints
int, float, bool, or str keep their type. Dicts and mixed lists fall back to JSON-string. See Properties → Type fidelity.Spans nest weirdly
track_ai calls don't show as children of my begin() block
track_ai calls don't show as children of my begin() block
ContextVar, which is per-thread for sync code and per-task for asyncio. Calling track_ai from a new thread or a concurrent.futures worker that didn’t inherit your context will produce a root span.See threading model for the full rules.track_ai inside a FastAPI handler steals my framework span
track_ai inside a FastAPI handler steals my framework span
track_ai and begin both detach from the caller’s OTel context on purpose, so your customer’s FastAPI/Django instrumentation isn’t pulled into our trace. If you want the Bento span to be a child of a parent OTel span, set its traceparent explicitly via the lower-level OTel transport.finish() raises RuntimeError 'out of order'
finish() raises RuntimeError 'out of order'
bento.begin() is still open. Trajectories must be finished LIFO. Use with bento.begin(...) as i: to guarantee correct nesting; the context manager handles cleanup on exception too.Local development
http:// and https:// schemes are accepted. A typo like BENTOLABS_BASE_URL=localhost:8080 (no scheme) raises ValueError on resolution.
Still stuck
Email support@bentolabs.ai with:- SDK version:
python -c "import bentolabs_sdk; print(bentolabs_sdk.SDK_VERSION)" - The
track_aicall you’re making (redact secrets) - The output of
print([t.name for t in threading.enumerate()])after init - Anything you see at WARNING-level Python logs