Skip to content

Professional Cloud DevOps Engineer · Domain 5: Optimizing performance and cost · 12% of the exam

Task 5.1: Collecting performance and utilization information in Google Cloud.

Application and agent performance monitoring, and Active Assist insights and recommendations.

Study it

  • Application and agent performance monitoring, Active Assist

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

A FinOps review uses Compute Engine machine type recommendations to resize a fleet of VMs. The engineers doubt the memory side of the recommendations, because the VMs run a cache whose memory use the default Compute Engine metrics do not show well. How can the team make the recommendations more precise?

  1. AWait until the VMs have run for 30 days, since recommendations look at a full month of data
  2. BApply the sustained use discount first, because recommendations compare prices after discounts
  3. CMove the VMs to custom machine types, which receive their recommendations based on application metrics
  4. DInstall the Ops Agent on the VMs so that the agent's own utilization metrics feed the recommender
Show the answer and why
  • AWait until the VMs have run for 30 days, since recommendations look at a full month of data

    Incorrect

    Recommendations are generated from the previous 8 days of metrics; a longer wait does not add memory data the VMs do not report.

  • BApply the sustained use discount first, because recommendations compare prices after discounts

    Incorrect

    Cost estimates in recommendations are computed before sustained use discounts, and discounts do not change the utilization data used.

  • CMove the VMs to custom machine types, which receive their recommendations based on application metrics

    Incorrect

    Custom machine types change the shapes on offer, not the metrics the recommender sees.

  • DInstall the Ops Agent on the VMs so that the agent's own utilization metrics feed the recommender

    Correct

    When the Ops Agent runs on a VM, the CPU and memory metrics it collects are used automatically to compute machine type recommendations, which makes them more precise.

Machine type (rightsizing) recommendations come from CPU and memory utilization gathered by Cloud Monitoring over the previous 8 days. The Ops Agent reports richer guest metrics, and when it is installed its CPU and memory data feed the recommendations directly.

Question 2 · choose 1

An agent built with the Agent Development Kit runs on Cloud Run, and some conversations take 40 seconds. The team needs to see which reasoning steps, tool calls and model calls take the time and how many tokens each uses. It also wants to keep full multimodal prompts and responses, some larger than 256 KiB, and be able to delete a single conversation on request. What should it set up?

  1. AOne Cloud Logging entry per prompt and response, with timing and token fields in jsonPayload
  2. BOpenTelemetry instrumentation that follows the generative AI semantic conventions, with traces in Cloud Trace and prompts in Cloud Storage
  3. CCloud Profiler on the Cloud Run service, with CPU and heap profiles compared across slow and fast conversations
  4. DA synthetic monitor that sends a test conversation to the agent every five minutes and records its total latency
Show the answer and why
  • AOne Cloud Logging entry per prompt and response, with timing and token fields in jsonPayload

    Incorrect

    Log entries are limited to 256 KiB, larger data is rejected or truncated, and individual log entries can't be deleted.

  • BOpenTelemetry instrumentation that follows the generative AI semantic conventions, with traces in Cloud Trace and prompts in Cloud Storage

    Correct

    Cloud Trace extracts events from spans that follow the generative AI conventions, and prompts and responses stored in a bucket can be large and deleted one conversation at a time.

  • CCloud Profiler on the Cloud Run service, with CPU and heap profiles compared across slow and fast conversations

    Incorrect

    Profiles show where the code spends CPU and memory, not which agent steps, tool calls and model calls a conversation went through.

  • DA synthetic monitor that sends a test conversation to the agent every five minutes and records its total latency

    Incorrect

    A synthetic probe measures end-to-end latency of its own test traffic; it does not break real conversations into steps or keep their prompts.

Agent telemetry captures reasoning steps, tool calls and token usage. Google recommends OpenTelemetry instrumentation (samples exist for ADK and LangGraph) so that Cloud Trace can show generative AI spans and events, with prompts and responses kept in Cloud Storage rather than in log entries because of the 256 KiB entry limit and the need to delete single conversations.

Question 3 · choose 1

The unattended project recommender reviews the organization's projects. Project ml-feature-store shows high API and network activity over the last 30 days, but every user who holds the Owner role on it has left the company. Which recommendation should the platform team expect for it?

  1. AReview or delete the project, with the CLEANUP_PROJECT subtype, because no active owner looks after it
  2. BReclaim the project by assigning a new owner, with the RECLAIM_PROJECT subtype
  3. CNo recommendation, because the recommender only reports projects that have had no activity at all for 30 days
  4. DMove the project's workloads to a shared project, with a CONSOLIDATE_PROJECT subtype, to reduce cost
Show the answer and why
  • AReview or delete the project, with the CLEANUP_PROJECT subtype, because no active owner looks after it

    Incorrect

    Cleanup recommendations are for projects with low usage over the last 30 days; this project is busy.

  • BReclaim the project by assigning a new owner, with the RECLAIM_PROJECT subtype

    Correct

    For projects with high usage whose user owners are all inactive, the recommender suggests reclaiming the project by assigning a new owner.

  • CNo recommendation, because the recommender only reports projects that have had no activity at all for 30 days

    Incorrect

    The recommender also covers busy projects that have no active owner, not only idle ones.

  • DMove the project's workloads to a shared project, with a CONSOLIDATE_PROJECT subtype, to reduce cost

    Incorrect

    The unattended project recommender offers cleanup and reclaim recommendations; consolidation is not one of its subtypes.

The unattended project recommender analyzes project usage over the last 30 days. Projects with low usage get a recommendation to review or delete them (CLEANUP_PROJECT); projects with high usage but no active user owner get a recommendation to assign a new owner (RECLAIM_PROJECT). Acting on them reduces security risk, cost and carbon footprint.

Question 4 · choose 1

A Go service on GKE already sends profiles to Cloud Profiler. Its p99 latency climbs under load while CPU use stays low, and the team suspects that many goroutines block on one sync.Mutex. Which profile type should the team open to find the code paths behind that lock?

  1. AWall time, which includes the time a function spends waiting on locks
  2. BCPU time, which shows the functions that keep the processor busy
  3. CThreads, which shows how many goroutines include each frame
  4. DContention, which shows the time spent waiting to serialize access
Show the answer and why
  • AWall time, which includes the time a function spends waiting on locks

    Incorrect

    Wall time would include lock waits, but Cloud Profiler does not collect wall time profiles for Go; they exist for Java, Node.js and Python.

  • BCPU time, which shows the functions that keep the processor busy

    Incorrect

    CPU time excludes the time code spends waiting, so blocked goroutines barely appear in it.

  • CThreads, which shows how many goroutines include each frame

    Incorrect

    The threads profile counts threads at a single point in time; it shows leaks and blocked threads, not the time spent waiting for the lock.

  • DContention, which shows the time spent waiting to serialize access

    Correct

    The contention profile, available for Go, measures time spent waiting to serialize access to a shared resource such as a mutex.

Cloud Profiler's profile types depend on the language. Go supports CPU time, heap, allocated heap, contention and threads; wall time is collected only for Java, Node.js and Python. CPU time leaves out waiting, threads counts threads at one instant, and contention measures time spent waiting to serialize access to shared resources, which is where a hot mutex shows up.

Question 5 · choose 1

A FinOps team builds automation that applies machine type recommendations from the Recommender API. Two runs must never act on the same recommendation, the recommendation must not change while it is being applied, and the outcome must be recorded on the recommendation itself. How should the automation handle each recommendation?

  1. AMark it CLAIMED with its ID and etag before acting, then mark it SUCCEEDED or FAILED once the change is done
  2. BMark it DISMISSED through the API before acting, so that other runs no longer see it in the list
  3. CLeave it ACTIVE and keep a lock record in a separate database table, then delete the record once done
  4. DMark its linked insight ACCEPTED before acting, which locks the recommendation and records the outcome
Show the answer and why
  • AMark it CLAIMED with its ID and etag before acting, then mark it SUCCEEDED or FAILED once the change is done

    Correct

    Using the etag makes the call succeed only if the recommendation is unchanged; a CLAIMED recommendation is no longer updated, and SUCCEEDED or FAILED records the result.

  • BMark it DISMISSED through the API before acting, so that other runs no longer see it in the list

    Incorrect

    Dismissing means rejecting a recommendation without applying it, and the API cannot set the DISMISSED state.

  • CLeave it ACTIVE and keep a lock record in a separate database table, then delete the record once done

    Incorrect

    An ACTIVE recommendation can still be updated when resources change, and nothing on the recommendation records the outcome.

  • DMark its linked insight ACCEPTED before acting, which locks the recommendation and records the outcome

    Incorrect

    ACCEPTED is an insight state; it does not claim the recommendation or record whether applying it worked.

Recommendations move from ACTIVE to CLAIMED while work is in progress, then to SUCCEEDED or FAILED; claimed and later states are not updated by Recommender and are kept for 90 days. Operations reference the recommendation ID and etag so that they run only if it has not changed. Dismissing and reactivating are done in the console, not the API.

Question 6 · choose 1

A checkout application spans eight services that send spans to Cloud Trace. An engineer wants to find which span names, across all services, have the highest average latency over the past day, using the Trace Explorer page without writing any SQL. Which view should the engineer use?

  1. AThe trace waterfall of the slowest single request found on the page, which lists that request's spans by duration
  2. BThe span duration chart, which plots the 50th, 90th, 95th and 99th percentiles of all spans over time
  3. CThe Grouped table, which groups spans by name and service and can be sorted to show statistics such as average latency
  4. DThe heatmap, selecting its darkest cell so that the page shows the span name with the highest average latency
Show the answer and why
  • AThe trace waterfall of the slowest single request found on the page, which lists that request's spans by duration

    Incorrect

    One trace shows one request; it does not give averages across all the day's spans.

  • BThe span duration chart, which plots the 50th, 90th, 95th and 99th percentiles of all spans over time

    Incorrect

    The chart shows percentiles across the selected spans, not a breakdown by span name and service.

  • CThe Grouped table, which groups spans by name and service and can be sorted to show statistics such as average latency

    Correct

    Each row of the Grouped table is a service and span name, and the table shows statistics like average latency that can be sorted.

  • DThe heatmap, selecting its darkest cell so that the page shows the span name with the highest average latency

    Incorrect

    A heatmap cell's color shows how many spans fall in it; selecting a cell filters the tables but does not rank span names by average latency.

Trace Explorer aggregates span data in a heatmap, latency percentile and span rate charts, and Spans and Grouped tables. The Grouped table groups spans by name and service or workload and shows statistics such as average latency; for custom aggregate analysis with SQL, use Observability Analytics or BigQuery.

Practice domain 5 →Practice all domains →