Documentation Index
Fetch the complete documentation index at: https://docs.trodo.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
My run appears but has zero spans
The LLM call happened outside thewrapAgent callback, or the framework isn’t auto-instrumented.
- Confirm the LLM client is imported after
trodo.init(). The auto-instrumenter hooksrequire/import; if the module is already loaded, the patch won’t apply. - Check the Integrations page for your framework. If it’s not listed, wrap the call manually with
trodo.withSpanor usetrackLlmCall. - Verify with
debug: trueontrodo.init(...)— the SDK logs every intercepted call.
My spans appear but have zero tokens
The provider returned a response shape Trodo doesn’t recognise. The three built-in shapes are OpenAI (usage.prompt_tokens), Anthropic (usage.input_tokens), and Google (usageMetadata.promptTokenCount).
For anything else — Cohere, Bedrock InvokeModel, custom endpoints — pass a custom extractUsage via trodo.llm(...), or use trackLlmCall with inputTokens / outputTokens set explicitly.
Cross-service run loses the connection
The receiving service didn’t read theX-Trodo-Run-Id header.
- Node/Express: install
trodo.expressMiddleware()before your routes. - Python/FastAPI: register
trodo.fastapi_middleware(). - Manual: read the header yourself and wrap the handler in
trodo.joinRun(runId, fn).
fetch(url, { headers: trodo.propagationHeaders() }).
Runs land but dashboard shows “Missing pricing”
The(provider, model) pair isn’t in the internal pricing table yet. Cost stays NULL; tokens and spans are still recorded. Workarounds:
- Pass
costexplicitly onsetLlmortrackLlmCall. - File a pricing-table request; it’ll be added and new runs will compute correctly.
Spans from a worker thread / ProcessPool are missing
Nodeworker_threads and Python ThreadPoolExecutor / ProcessPoolExecutor break AsyncLocalStorage / contextvars boundaries. Capture runId in the main thread and pass it to the worker, then use joinRun inside. See Spans outside wrapAgent.
Feedback shows “unknown run”
feedback(runId, ...) was called before the run had finished flushing. The backend reconciles eventually, but the dashboard may briefly show the feedback against a missing run. Wait until wrapAgent has returned before calling feedback.
402 Payment Required in debug logs
You’re over your plan’s event limit for the month. Runs are dropped silently (no thrown errors). Upgrade your plan or wait for the monthly reset. Spans, feedback, embeddings, and retries are never rate-limited — only run ingestion.
Enable debug logging
- Node.js
- Python
sdkapi.trodo.ai, and any dropped events with reasons.