Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team manages a Go-based microservices application on Google Kubernetes Engine (GKE) that is experiencing intermittent latency spikes and high compute costs in production. Preliminary metrics show elevated request durations and heavy CPU utilization during peak traffic.
To resolve these issues, you need to:
Which approach should you take?
Cloud Trace custom spans allow developers to add granular timing measurements around specific internal operations—such as complex business logic or external API calls—and attach custom annotations or labels. Trace Explorer displays aggregate latency distributions as heatmaps and individual traces as waterfall graphs.
You already knew a specific microservice was slow and wanted to measure the elapsed wall-clock latency of a few coarse-grained internal stages—such as parsing a payload versus calling a third-party API.
Developers often confuse tracing with code profiling. Cloud Trace answers where a request spent elapsed time across distributed components, whereas Cloud Profiler answers which functions consumed CPU cycles and allocated heap memory inside a service.
The Heap (heap usage) profile type in Cloud Profiler captures a snapshot of the total amount of memory currently retained in the program's heap at a single instant in time. It is designed to help developers detect retained objects and potential memory leaks.
traceparent across HTTP or RPC boundaries, so it cannot map end-to-end request paths or pinpoint slow downstream microservices.You were troubleshooting a suspected memory leak causing out-of-memory (OOM) errors inside a single Go service and needed to see which functions held onto memory over time.
When optimizing Go applications for garbage collection efficiency, always examine Allocated heap alongside CPU time in Cloud Profiler, and rely on Cloud Trace for distributed request latency.
Cloud Monitoring collects and visualizes aggregated time-series metrics—such as CPU utilization, memory usage, and percentile request latencies—across infrastructure and services. Local microbenchmarks isolate individual functions in a development environment to measure execution speed or memory behavior under synthetic inputs.
You needed to track high-level service level objectives (SLOs), trigger alerts on cluster-wide latency thresholds, or validate an algorithmic change to an isolated pure function before deploying code.
A common misconception is that aggregate metrics and pre-production load tests can replace production observability. While Cloud Monitoring tells you when latency or CPU spikes occur, you need Cloud Trace to follow request flows across services and Cloud Profiler to continuously observe actual production code paths.
Cloud Trace is a distributed tracing system that tracks end-to-end request latency across microservices architectures. Cloud Profiler is a statistical, continuous profiling tool that gathers CPU usage and memory-allocation data from live production applications and attributes that consumption directly to source code functions.
runtime.gcBgMarkWorker.*).Unlike aggregate metrics, local benchmarks, or heavy debugging tools, pairing Cloud Trace with Cloud Profiler provides both cross-service latency visibility and production-safe, code-level CPU and allocation attribution.
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