PDE Practice Question: A company uses Cloud Logging to monitor…
A company uses Cloud Logging to monitor application errors. They want to set up real-time notifications for critical errors. Which two actions are essential? (Choose two.)
⚠ Common exam trap
A common trap is to think that creating a Cloud Pub/Sub notification directly on a log sink (option C) provides real-time notifications for critical errors. However, a log sink exports log entries to a destination (like Pub/Sub) for storage or processing, not for immediate alerting. Real-time notifications require a log-based metric and an alerting policy in Cloud Monitoring (options A and E).
Correct answer & explanation
Option A is correct because a log-based metric is the mechanism that converts matching log entries (e.g., a filter for severity=ERROR or specific critical error text) into a numeric time series that Cloud Monitoring can evaluate; without it there is no metric for alerting. Option E is correct because a Cloud Monitoring alert policy is what actually triggers real-time notifications, and it must be based on the log-based metric created in A to fire when critical errors occur. Option B is not essential since exporting to BigQuery is for retrospective analysis, not real-time alerting. Option C is not essential because a Pub/Sub notification on a log sink is a separate log-routing feature and does not by itself create a Monitoring alert with notification channels. Option D is not essential because VPC Flow Logs capture network traffic metadata and are unrelated to application error alerting.
Go deeper
Related to this question
About these practice questions
One of 747 original PDE 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 →
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PDE 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 PDE exam.