SQ57
A platform team wants to create log-based metrics that track the count of HTTP 500 errors in application logs and alert when the rate exceeds a threshold. Which workflow is correct?
- ADisable 500 errors in the application
- BExport all logs to BigQuery → Run a daily SQL query
- CCreate a log-based metric in Cloud Logging → Create an alerting policy in Cloud Monitoring
- DManually grep logs hourly
Show answerHide answer
Answer: C
Log-based metrics extract counter or distribution metrics from log entries, and Cloud Monitoring alerting policies trigger notifications when thresholds are breached—all in near real-time.