Gemini CLI (tracing)
Gemini CLI is Google’s AI coding agent for the terminal, powered by Gemini models. It can analyze codebases, generate and edit files, run commands, and handle complex multi-step coding workflows with built-in thinking capabilities. Respan gives you full observability over every conversation including thinking, tool calls, and responses, plus gateway routing through the Respan endpoint.
Set up Respan
Create an account at platform.respan.ai and grab an API key .
For application setup, follow Agent setup.
Setup
Paste this into your coding agent:
Help me set up Respan tracing for Gemini CLI: fetch and follow https://www.respan.ai/docs/integrations/gemini-cli.mdThe agent checks your credentials, configures tracing, and verifies that a session reached Respan. Include your project, customer identifier, and preferred configuration scope in the request if needed.
Configuration
Ask your coding agent to adjust the existing tracing configuration for your project, customer identifier, workflow name, or custom attributes. It should preserve unrelated agent settings and verify the result with Respan traces or logs.
Captured data
| Data | Description |
|---|---|
| User prompt | The user’s input text. |
| Assistant response | Gemini CLI’s final response. |
| Thinking blocks | Thinking / reasoning content. |
| Tool calls | Tool name, input, and output. |
| Token usage | Input, output, and cache tokens. |
| Timing | Start time, end time, latency. |
| Model | Model name (e.g. gemini-2.5-pro, gemini-2.5-flash). |
Span types
| Span | log_type | Description |
|---|---|---|
| Root | agent | The complete conversation turn. |
| Thinking | generation | Thinking / reasoning blocks. |
| Tool | tool | Tool invocations. |
Uninstall
Ask your coding agent:
Remove Respan tracing from Gemini CLI, preserving unrelated agent settings and provider configuration.