- A
fetch custom::requests_total | { filter status_code >= 500 ; group_by [endpoint], sum() } / { group_by [endpoint], sum() } | condition gt 0.05
Correct: groups errors and total by endpoint, divides, and applies condition.
- B
fetch custom::requests_total | filter status_code < 500 | ratio | condition gt 0.05
Why wrong: Filters for success codes, not errors.
- C
fetch custom::requests_total | group_by [endpoint], sum() | filter status_code >= 500 | ratio | condition gt 0.05
Why wrong: Sums all counts first, then filters; invalid order.
- D
fetch custom::requests_total | filter status_code >= 500 | ratio | condition gt 0.05
Why wrong: Missing group_by; would compute a global ratio, not per endpoint.
Quick Answer
The correct MQL query is: fetch custom::requests_total | { filter status_code >= 500 ; group_by [endpoint], sum() } / { group_by [endpoint], sum() } | condition gt 0.05. This works because it first isolates error responses by filtering for status codes of 500 or higher, then uses a ratio join—the curly-brace syntax—to divide the error count per endpoint by the total request count per endpoint, yielding a precise error rate for each endpoint over the 5-minute window. On the Google Professional Cloud Developer exam, this question tests your ability to construct MQL ratio alerts with label-based grouping, a common scenario for monitoring microservice health. A frequent trap is forgetting that both the numerator and denominator must use the same group_by clause to maintain per-endpoint alignment; using a single group_by on the entire pipeline would compute a global rate instead. Memory tip: think of the curly braces as two separate “buckets” that you divide—errors on top, total on bottom—with group_by ensuring each endpoint stays in its own lane.
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.
A company uses Cloud Monitoring with custom metrics. They have a custom metric called 'requests_total' with labels 'endpoint', 'status_code'. They want to create an alert that fires if the error rate (status_code >=500) for any endpoint exceeds 5% over a 5-minute window. Which MQL query should they use?
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
fetch custom::requests_total | { filter status_code >= 500 ; group_by [endpoint], sum() } / { group_by [endpoint], sum() } | condition gt 0.05
Option A is correct because it first filters for error responses (status_code >= 500), then groups by endpoint and sums the error count, and divides that by the total count per endpoint (also grouped and summed). This computes the error rate per endpoint, and the condition fires when that rate exceeds 0.05 (5%) over the 5-minute window. The use of two separate group_by operations within a join (the `{ ... } / { ... }` syntax) is the correct MQL pattern for calculating a ratio per label.
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.
- ✓
fetch custom::requests_total | { filter status_code >= 500 ; group_by [endpoint], sum() } / { group_by [endpoint], sum() } | condition gt 0.05
Why this is correct
Correct: groups errors and total by endpoint, divides, and applies condition.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
fetch custom::requests_total | filter status_code < 500 | ratio | condition gt 0.05
Why it's wrong here
Filters for success codes, not errors.
- ✗
fetch custom::requests_total | group_by [endpoint], sum() | filter status_code >= 500 | ratio | condition gt 0.05
Why it's wrong here
Sums all counts first, then filters; invalid order.
- ✗
fetch custom::requests_total | filter status_code >= 500 | ratio | condition gt 0.05
Why it's wrong here
Missing group_by; would compute a global ratio, not per endpoint.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Cisco often tests the distinction between `ratio` (which operates on the number of time series) and explicit division with group_by (which operates on metric values per label), leading candidates to incorrectly choose a `ratio`-based query that ignores per-endpoint grouping.
Detailed technical explanation
How to think about this question
MQL's `ratio` operator automatically computes the ratio of the number of time series in the left operand to the number in the right operand, but it does not preserve label dimensions unless explicitly grouped. The `{ ... } / { ... }` syntax creates a join operation that aligns time series by their common labels (in this case `endpoint`), ensuring the error rate is calculated independently for each endpoint. This is critical because a 5% error rate on a low-traffic endpoint could trigger an alert even if the overall error rate is low, and vice versa.
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
An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.
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.
- →
Managing application performance monitoring — study guide chapter
Learn the concepts, then practise the questions
- →
Managing application performance monitoring practice questions
Targeted practice on this topic area only
- →
All PCD questions
500 questions across all exam domains
- →
Google Professional Cloud Developer study guide
Full concept coverage aligned to exam objectives
- →
PCD practice test guide
How to use practice tests most effectively before exam day
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.
Designing highly scalable, available, and reliable cloud-native applications practice questions
Practise PCD questions linked to Designing highly scalable, available, and reliable cloud-native applications.
Building and testing applications practice questions
Practise PCD questions linked to Building and testing applications.
Deploying applications practice questions
Practise PCD questions linked to Deploying applications.
Integrating Google Cloud services practice questions
Practise PCD questions linked to Integrating Google Cloud services.
Managing application performance monitoring practice questions
Practise PCD questions linked to Managing application performance monitoring.
PCD fundamentals practice questions
Practise PCD questions linked to PCD fundamentals.
PCD scenario practice questions
Practise PCD questions linked to PCD scenario.
PCD troubleshooting practice questions
Practise PCD questions linked to PCD troubleshooting.
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: fetch custom::requests_total | { filter status_code >= 500 ; group_by [endpoint], sum() } / { group_by [endpoint], sum() } | condition gt 0.05 — Option A is correct because it first filters for error responses (status_code >= 500), then groups by endpoint and sums the error count, and divides that by the total count per endpoint (also grouped and summed). This computes the error rate per endpoint, and the condition fires when that rate exceeds 0.05 (5%) over the 5-minute window. The use of two separate group_by operations within a join (the `{ ... } / { ... }` syntax) is the correct MQL pattern for calculating a ratio per label.
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 →
Same concept, more angles
1 more ways this is tested on PCD
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company has a Cloud Run service that uses Cloud SQL. They notice that the number of database connections is increasing over time, causing connection pool exhaustion. They have enabled Cloud Monitoring and see a custom metric for active DB connections. To proactively alert when the connection count exceeds 80% of the maximum pool size (which is 100), which alerting approach is most efficient?
hard- A.Create a metric threshold alert on the custom metric with condition > 80.
- B.Create a forecast alert to predict when connections will exceed 80.
- C.Create an alert on the Cloud SQL system metric for 'cloudsql.googleapis.com/database/connections/num_failed_reserved'.
- ✓ D.Create a ratio alert using an MQL query that divides the active connections by the max connections and alerts when > 0.8.
Why D: Option D is correct because it creates a ratio alert using MQL to divide the active connections by the maximum pool size (100), triggering when the ratio exceeds 0.8 (80%). This directly measures the utilization of the connection pool, which is the most efficient way to alert on impending exhaustion. It avoids hardcoding a static threshold that would break if the pool size changes, and it uses the custom metric already being monitored.
Last reviewed: Jun 25, 2026
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.
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.
Sign in to join the discussion.