Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
A DevOps engineer is analyzing distributed traces in Google Cloud Observability to diagnose high latency in an e-commerce application. A transaction on the /checkout endpoint takes 1,450 ms to complete.
Inspection of the Gantt chart and span tree in Cloud Trace Explorer displays the following span execution details:
| Span Name | Parent Span | Start Offset | Duration |
|---|---|---|---|
checkout_handler | None (Root) | 0 ms | 1,450 ms |
├── validate_cart | checkout_handler | 10 ms | 40 ms |
├── get_user_profile | checkout_handler | 50 ms | 100 ms |
├── fetch_loyalty_points | checkout_handler | 50 ms | 120 ms |
├── process_order | checkout_handler | 170 ms | 1,250 ms |
│ ├── reserve_inventory | process_order | 180 ms | 150 ms |
│ └── call_payment_gateway | process_order | 330 ms | 1,080 ms |
│ └── http_post_external_psp | call_payment_gateway | 340 ms | 1,060 ms |
└── send_confirmation_email | checkout_handler | 1,420 ms | 30 ms |
Based on this trace waterfall visualization, what does the execution timeline reveal about the application's critical path and primary latency bottleneck?
A trace waterfall visualization (or Gantt chart) in Cloud Trace displays the lifecycle of a request as a tree of nested, timed spans. Spans represent discrete units of contiguous work, while parent-child relationships depict service call hierarchies and nested sub-operations.
get_user_profile (50 ms – 150 ms) and fetch_loyalty_points (50 ms – 170 ms) share the exact same start offset (50 ms). Because their execution windows overlap under the parent checkout_handler, they run concurrently. The subsequent step (process_order) starts at 170 ms, exactly when the slower parallel span finishes.process_order, reserve_inventory runs from 180 ms to 330 ms, after which call_payment_gateway begins at 330 ms. Because their execution windows do not overlap, these operations execute sequentially.http_post_external_psp takes 1,060 ms out of the total 1,450 ms request duration (over 73% of total request time). Because it sits directly on the sequential critical path, optimizing or asynchronously handling this external payment gateway call is the key to reducing endpoint latency.This interpretation directly reflects the exact timeline and structural dependencies of the distributed trace, correctly recognizing both parallel execution windows and sequential blocking operations.
This option claims that the root span checkout_handler itself is spending the majority of its time executing internal application code (known as exclusive time or self-time) rather than waiting for downstream child spans.
validate_cart 40 ms, parallel fetching 120 ms, process_order 1,250 ms, send_confirmation_email 30 ms).http_post_external_psp (1,060 ms), not in the root handler's local CPU instructions.The root span checkout_handler had a duration of 1,450 ms but child spans only accounted for 150 ms, leaving an unexplained gap of 1,300 ms of active time without child spans.
Cloud Trace allows filtering and sorting by span latency to quickly separate spans with large child wait times from those with high internal computation times.
This option claims that inventory reservation and payment processing run concurrently under process_order, and misidentifies the 150 ms reserve_inventory span as the critical path bottleneck.
reserve_inventory runs from 180 ms to 330 ms (duration 150 ms), and call_payment_gateway starts at 330 ms (duration 1,080 ms). Their execution windows do not overlap; they run sequentially.call_payment_gateway (1,080 ms) is significantly longer than reserve_inventory (150 ms), meaning the payment gateway would remain the critical path constraint.reserve_inventory had a start offset of 180 ms and ran for 1,200 ms, while call_payment_gateway ran alongside it from 180 ms to 300 ms.
To optimize sequential flows like this, engineers often evaluate whether certain non-dependent steps (such as inventory checks and payment pre-authorizations) can be refactored into parallel asynchronous operations.
This option asserts that user profile retrieval and loyalty point fetching are performed sequentially in a blocking fashion, accounting for an aggregate additive delay of 220 ms.
get_user_profile and fetch_loyalty_points have a start offset of 50 ms. If they were executed sequentially, the second span would have started at 150 ms (when get_user_profile finished) and ended at 270 ms.120 ms), ending at 170 ms when process_order starts.max(span_a, span_b) rather than span_a + span_b.The trace waterfall showed get_user_profile starting at 50 ms and ending at 150 ms, followed by fetch_loyalty_points starting at 150 ms and ending at 270 ms.
A common mistake in trace analysis is summing all child durations rather than checking whether their timeline intervals overlap horizontally on the Gantt chart.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated