Wrap yourDocumentation Index
Fetch the complete documentation index at: https://docs.lumiqtrace.com/llms.txt
Use this file to discover all available pages before exploring further.
GoogleGenerativeAI client with wrapGoogle(). All generateContent and chat calls are traced automatically.
Installation
Setup
Example
What gets captured
| Field | Details |
|---|---|
| Model | gemini-2.5-flash, gemini-2.5-pro, etc. |
| Input tokens | From usageMetadata.promptTokenCount |
| Output tokens | From usageMetadata.candidatesTokenCount |
| Cost | Calculated from token counts and Google pricing |
| Latency | Total request duration |
| Finish reason | STOP, MAX_TOKENS, SAFETY, etc. |
Chat sessions
sendMessage call is traced as a separate span in the session.
Next steps
- Google ADK — trace full ADK agents built with Gemini
- Agent tracing — wrap multi-agent workflows