Question 265 of 500
Managing application performance monitoringhardMultiple ChoiceObjective-mapped

Quick Answer

The correct PromQL query for alerting on 95th percentile latency over a 5-minute window is `histogram_quantile(0.95, rate(order_processing_duration_seconds_bucket[5m]))`. This works because `histogram_quantile` computes the exact threshold below which 95% of observed values fall, but it must be fed a rate of bucket increases—not raw bucket counts—to account for the cumulative nature of Prometheus histograms and avoid stale data. The `rate()` function normalizes the bucket counters to a per-second increase over the 5-minute window, enabling accurate percentile estimation even as the metric resets. On the Google Professional Cloud Developer exam, this question tests your understanding of PromQL for custom metrics in Cloud Monitoring, specifically the mandatory pairing of `histogram_quantile` with `rate()` or `increase()`. A common trap is using `avg()` or `max()` on histogram metrics, which yields meaningless results. Memory tip: think "quantile needs rate to calculate—without rate, your percentile is stale."

PCD Managing application performance monitoring Practice Question

This PCD practice question tests your understanding of managing application performance monitoring. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

An application running on GKE uses a custom metric to track order processing time. The metric is exported via Prometheus and ingested by Cloud Monitoring using the Managed Service for Prometheus. The team wants to create an alert when the 95th percentile latency exceeds 2 seconds over a 5-minute window. Which PromQL query should be used?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

histogram_quantile(0.95, rate(order_processing_duration_seconds_bucket[5m]))

Option D is correct because `histogram_quantile(0.95, rate(order_processing_duration_seconds_bucket[5m]))` computes the 95th percentile latency over a 5-minute window using Prometheus histogram buckets. The `rate()` function calculates the per-second increase of each bucket, which is required for accurate quantile estimation from cumulative histograms, and the result directly gives the latency threshold below which 95% of requests fall.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • avg(rate(order_processing_duration_seconds_sum[5m])) / avg(rate(order_processing_duration_seconds_count[5m]))

    Why it's wrong here

    This computes average, not 95th percentile.

  • histogram_quantile(0.95, sum(rate(order_processing_duration_seconds_bucket[5m])))

    Why it's wrong here

    Sum is unnecessary and may produce incorrect results.

  • histogram_quantile(0.95, order_processing_duration_seconds_bucket)

    Why it's wrong here

    Missing rate function, needed for correct calculation.

  • histogram_quantile(0.95, rate(order_processing_duration_seconds_bucket[5m]))

    Why this is correct

    Correct function to compute percentile from histogram.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the requirement to use `rate()` with `histogram_quantile` for time-windowed percentile calculations, and the trap here is that candidates mistakenly omit `rate()` (option C) or incorrectly aggregate with `sum()` before quantile (option B), thinking they need to combine all series first.

Detailed technical explanation

How to think about this question

Prometheus histograms use cumulative buckets where each bucket includes all observations less than or equal to its upper bound. The `rate()` function converts these cumulative counters into per-second rates, which is essential because `histogram_quantile` expects monotonically increasing rates, not raw cumulative counts, to estimate the quantile correctly. In a real-world scenario, if the application has a burst of slow orders, the rate-based quantile will quickly reflect the spike, whereas raw counts would lag and smooth out the alert sensitivity.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCD practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCD practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCD question test?

Managing application performance monitoring — This question tests Managing application performance monitoring — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: histogram_quantile(0.95, rate(order_processing_duration_seconds_bucket[5m])) — Option D is correct because `histogram_quantile(0.95, rate(order_processing_duration_seconds_bucket[5m]))` computes the 95th percentile latency over a 5-minute window using Prometheus histogram buckets. The `rate()` function calculates the per-second increase of each bucket, which is required for accurate quantile estimation from cumulative histograms, and the result directly gives the latency threshold below which 95% of requests fall.

What should I do if I get this PCD question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More PCD practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCD practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCD exam.