CV0-004 Operations and Support Practice Question
A cloud operations team manages a multi-tier web application on Google Cloud. The application logs are being written to Cloud Logging, and the team needs to be alerted whenever the number of HTTP 500 errors exceeds 50 in a 5-minute window. Which action should the team take to meet this requirement?
⚠ Common exam trap
The trap here is assuming that Cloud Trace or uptime checks can alert on application error counts, when they actually measure latency or availability rather than log-derived error volume.
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 log-based metric in Cloud Logging that counts HTTP 500 entries, then create a Cloud Monitoring alerting policy based on that metric with a threshold of 50 over 5 minutes.
The correct approach is to derive a metric from the logs using a log-based metric in Cloud Logging, then use Cloud Monitoring to alert on that metric. This natively supports counting specific log entries and applying a threshold over a time window, which matches the requirement exactly without custom code.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable Cloud Trace on the application and create an alerting policy that triggers when the error rate exceeds 50 per 5 minutes.
Why it's wrong here
Cloud Trace is designed for distributed tracing and latency analysis, not for counting HTTP 500 errors from logs. It does not ingest application log entries as metrics, so it cannot be used to alert on the number of 500 errors. This service is the wrong tool for the stated requirement.
- ✓
Create a log-based metric in Cloud Logging that counts HTTP 500 entries, then create a Cloud Monitoring alerting policy based on that metric with a threshold of 50 over 5 minutes.
Why this is correct
Log-based metrics in Cloud Logging convert log entries matching a filter into a numeric time series. Creating a metric that counts HTTP 500 entries, then attaching a Cloud Monitoring alerting policy with the specified threshold and window, directly satisfies the requirement. This is the standard Google Cloud pattern for alerting on log content.
- ✗
Use Cloud Monitoring uptime checks to monitor the application endpoint and alert when the failure count exceeds 50 in 5 minutes.
Why it's wrong here
Uptime checks test availability from external locations and report success or failure of the check itself. They do not count HTTP 500 responses generated by the application's internal logic or logged errors. Therefore, they cannot provide the required error-count threshold alert.
- ✗
Configure a Cloud Logging sink to Pub/Sub and create a Cloud Function that counts errors and sends an email when the count exceeds 50.
Why it's wrong here
While this pipeline is technically possible, it introduces custom code and additional services (Pub/Sub, Cloud Functions) that must be maintained. It does not natively provide the threshold-based alerting with a 5-minute window, and it is not the recommended or simplest approach for this requirement.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CV0-004 question from scratch — 834 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.