An operations engineering team needs to set up automated alerting for unexpected HTTP 500 application error rates occurring in a Cloud Run service. The team wants to track these errors using a custom log-based metric and send real-time alerts to a dedicated Webhook notification channel. What is the correct sequence of steps to configure this logging, metric, and alerting pipeline?
- 1Define a custom counter metric in Cloud Logging with a filter matching the Cloud Run resource type and HTTP status code 500.
- 2Configure and verify the Webhook notification channel in Cloud Monitoring settings.
- 3Create an alerting policy in Cloud Monitoring configured with a threshold condition monitoring the rate of the custom log-based metric.
- 4Attach the Webhook notification channel to the alerting policy and enable the policy.
Answer
The operational pipeline must be built logically from metric creation to alert delivery: first, create the custom log-based counter metric in Cloud Logging filtering for HTTP 500 logs; second, set up and verify the target Webhook notification channel in Cloud Monitoring; third, create the alerting policy targeting the log-based metric threshold; finally, attach the notification channel to the alerting policy and activate it.
Configuring operational alerting on log data requires a strict dependency sequence. First, the log entry pattern must be captured as a custom metric in Cloud Logging. Next, the target notification endpoint (Webhook) must be registered in Cloud Monitoring. Third, the alerting policy rule must be created using the metric time series as its condition source. Finally, the notification channel is linked to the policy to finalize alert delivery.
Step-by-Step Solution
Key Concept
Log-based metric and alerting policy configuration workflow in Google Cloud Observability