A DevOps team manages a Google Cloud environment with many projects. They need a centralized view of all audit logs and the ability to create log-based metrics that alert on suspicious IAM changes across all projects. Which Google Cloud service should they use?
Cloud Logging provides a centralized log management interface where logs from all projects can be aggregated into a log bucket or viewed via a log router. It supports log-based metrics that can be created from audit logs and then used for alerting. This directly meets the need for a single view and metric creation across projects.
Why this answer
Centralizing audit logs from multiple projects and building log-based metrics points to Cloud Logging. It can route logs from all projects into a single log bucket, and its log-based metrics can be used with Cloud Monitoring for alerts. Cloud Monitoring, Cloud Asset Inventory, and Security Command Center serve different purposes and do not provide the combined log aggregation and metric creation capability required.
Exam trap
The trap here is confusing a security posture tool like Security Command Center with a log aggregation service, assuming it can centralize and create custom metrics from audit logs.