PCDOE Implementing service monitoring strategies Practice Question
A company uses Cloud Run for a critical service and needs to set up alerting for 5xx errors. They want to receive a notification within 1 minute of the error rate exceeding 1% for any 1-minute window. Which alerting approach should they use?
⚠ Common exam trap
Google Cloud often tests the distinction between log-based metrics (which have inherent sampling and aggregation delays) and built-in request metrics (which are real-time and window-aware), leading candidates to mistakenly choose log-based alerting for rate-based conditions.
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
✓
Create a Cloud Monitoring alerting policy using the 'Request count' metric with a condition that compares the ratio of 5xx responses to total requests over a 1-minute window.
Cloud Monitoring's alerting policies can directly compute the ratio of 5xx responses to total requests using the 'Request count' metric with a custom ratio condition over a 1-minute window. This approach meets the 1-minute notification latency requirement without additional infrastructure, as Cloud Monitoring evaluates the metric every 60 seconds and triggers alerts based on the sliding window.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set up a log-based metric for 5xx responses and create an alert on the metric.
Why it's wrong here
Log-based metrics have ingestion latency, often exceeding 1 minute, and may not meet the sub-minute alert requirement.
- ✗
Create a Cloud Logging sink to a Pub/Sub topic and trigger a Cloud Function that sends notifications.
Why it's wrong here
This approach relies on Cloud Logging's export latency, which can be several minutes, and does not provide a rate-based condition.
- ✗
Use Cloud Monitoring's log-based alerting to trigger on every 5xx log entry.
Why it's wrong here
Alerting on every log entry can cause alert fatigue and does not allow for a rate condition like exceeding 1%.
- ✓
Create a Cloud Monitoring alerting policy using the 'Request count' metric with a condition that compares the ratio of 5xx responses to total requests over a 1-minute window.
Why this is correct
Cloud Monitoring supports metric evaluation every few seconds, and the ratio condition meets the requirement of alerting within 1 minute.
Go deeper
Related to this question
About these practice questions
One of 486 original PCDOE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCDOE 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 PCDOE exam.