GCP Associate Cloud Engineer Practice Question

An online retailer runs a Cloud Run service. Each time a payment fails, the application writes a structured log entry with severity ERROR and the field payment_status="DECLINED". You must alert the on-call team whenever 20 or more such failures occur within any one-minute window, and you cannot modify application code or deploy additional services. What is the most efficient way to deliver this alert?

  • Create an uptime check that polls the Cloud Run service endpoint every minute and configure an alert to fire if 20 or more requests return a 5xx status within the last minute.

  • Enable Cloud Audit Logs for Cloud Run, create a distribution logs-based metric on all audit log entries, and configure an alert that triggers when the metric's 95th-percentile value exceeds 20.

  • Use Logs Explorer to filter for resource.type="cloud_run_revision" AND severity=ERROR AND jsonPayload.payment_status="DECLINED", create a counter logs-based metric, then build a Cloud Monitoring alerting policy that fires when the metric's rate exceeds 20 per minute.

  • Export the filtered logs to Pub/Sub, invoke a Cloud Function that increments a custom Cloud Monitoring metric for each message received, and set an alert on that metric when it exceeds 20 per minute.

GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot