LLM clients
Vertex AI tracing for Python and Node.js
Vertex AI is traced like every other client; Python also covers Anthropic models served through Vertex.
Set up Vertex AI
The snippet is copied from the SDK README, not paraphrased. Keys shown as tk_live_... are the environment key from Settings › Environments.
import evalkit
evalkit.init(
subscription_key="tk_live_...", # Dashboard → Settings → Tracing
service_name="my-service",
)Copied from sdk-py/README.md § Quick start
Install → first trace
- 01
Install the SDK
pip install syntropylabs-evalkit or npm install syntropylabs-evalkit.
- 02
Call init() once
Pass your environment key and a service name, as early as possible in the process, before other modules run requests.
- 03
Make one Vertex AI call
No wrapper and no decorator: the call is traced automatically with model, latency and tokens.
- 04
Open the first trace
Traces shows the call as a span; the environment’s quickstart page ticks when it arrives.
What a turn looks like
Sample data in the product’s own table. Hover, focus or tap a claim to see the columns it points at.
Sample run
| Operation | Service | Status | Model | Latency | Tokens | ≈Cost | Score |
|---|---|---|---|---|---|---|---|
| support_agent.turn8f3a1c0d94e2session sess_4b1e | support-api | ok | gpt-4o-mini | 1.84 s | 3,412 | $0.0006 | 92%auto |
| refund_agent.turnc21d7e5a30b8session sess_9a02tool loop | refund-worker | ok | claude-sonnet-4 | 4.31 s | 7,905 | $0.0389 | 68%auto |
| claude-code.turn5be04f7d1a96session sess_f77c | Claude Code | unset | claude-sonnet-4 | 48.20 s | 61,208 | $0.19 | — |
| rag.answere9a2b6c4d015error | docs-bot | error | gpt-4o | 6.02 s | 9,880 | $0.0312 | 41%auto |
| voice.turn17c8d3f2a4e0session sess_20d1 | ivr-agent | ok | gpt-4o-realtime | 0.92 s | 1,104 | $0.0071 | — |
fig. 1 · the traces table this integration fills · sample data
What you see
Taken from the SDK READMEs’ coverage tables. with flag means the signal leaves your machine only when you opt in.
| Signal | Captured | Detail |
|---|---|---|
| LLM call span with model, latency and tokens | yes | — |
| Time to first token on streams | partial | Python: GenerativeModel.generate_content(stream=True) and Anthropic-on-Vertex messages.create(stream=True); the TypeScript list does not name Vertex |
| Prompts and completions | yes | on by default; capture_content=False / captureContent: false keeps every metric and drops every payload |
| HTTP and database calls around the model call | yes | — |
| Your own functions | partial | on by default in Python for your app’s source tree; opt-in in TypeScript with traceFunction, traceTool or @Traced |
| Client-side tool output | with flag | only when the tool is wrapped with trace_tool / traceTool |
Limitations
- Streaming time to first token is documented for the Python SDK; the TypeScript README’s streaming list does not name Vertex.
- A client-side tool the model calls only shows its output if you wrap it with trace_tool / traceTool; server-side tools and LangChain tools are automatic.
- Cost is computed from the model catalogue’s price sheet in the browser, not reported by the provider, and is shown as approximate.
Next steps
Trace Vertex AI today
Tracing is free for one project on every plan, coding-agent traces included. Evaluations, datasets and simulation are Pro and up.