Agent responses take 12 seconds, and you need to find which step is slow. What do you use?
- Exam domain
- Evaluating and deploying agentic workflows~22% of the exam
- Difficulty
- Medium
- In this mock
- 11 questions on this domainPractise this domain
Why the exam asks this
Deploying and scaling production workloads.
Objective in the exam guide: Monitoring and optimizing agents for performance, reliability, and cost (e.g., identify logic errors, latency bottlenecks, and hallucinations).
Finding latency bottlenecks needs per-step timing.
Why C is the answer
Traces in Cloud Trace showing the time spent in every model and tool call
Traces break a request into spans for each model call and tool call, so the slow step is visible.
Remember: Find latency with traces.
How it works
Agent Runtime exports traces to Cloud Trace.
Each span covers a unit of work such as a model or tool call, with its duration.
Clues in the question
The words that point to the answer, and what each one tells you.
- which step is slow
- Per-step timing, so traces.
In detail
- Google Cloud Observability covers Cloud Logging and Cloud Trace.
- Agent Gateway also exports traces and access logs.
- Run independent tool calls in parallel once you know the slow ones.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Guess and rewrite the promptWrong
Guessing wastes time.
B. Add more replicas, then compare response times againWrongMost tempting
Replicas do not help if one tool call is slow.
Why it tempts: More replicas help throughput, not one slow step.
C. Traces in Cloud Trace showing the time spent in every model and tool callRight
Find latency with traces.
D. Turn off logging to speed things upWrong
Logging is rarely the bottleneck, and you lose evidence.
Use case
An illustrative scenario, not a real incident.
Illustrative: a trace shows an inventory lookup taking nine seconds. Caching it brings the reply under three seconds.
See it in different ways
sequenceDiagram participant P0 as Agent participant P1 as Model participant P2 as Inventory tool P0->>P1: plan, 1 second P0->>P2: lookup, 9 seconds P2-->>P0: result P0->>P1: answer, 2 seconds
How to read this chart
- 1. Agent sends "plan, 1 second" to Model.
- 2. Agent sends "lookup, 9 seconds" to Inventory tool.
- 3. Agent gets a reply from Inventory tool: "result".
- 4. Agent sends "answer, 2 seconds" to Model.
flowchart LR S0["Trace a slow request"] --> S1["Find the longest span"] --> S2["Fix that step"] --> S3["Measure again"]
How to read this chart
- Read it in order: Trace a slow request, then Find the longest span, then Fix that step, then Measure again.