A developer needs to debug a production issue by analyzing logs from multiple microservices. Which Google Cloud service should they use to filter and search logs in real time?
Cloud Logging is designed for log management and analysis in real time.
Why this answer
Cloud Logging (formerly Stackdriver Logging) is the correct service because it provides a centralized log management system that can ingest logs from multiple microservices, filter them using advanced queries, and search them in real time. Its Logs Explorer interface supports custom filters, labels, and timestamps, enabling developers to pinpoint production issues across distributed services without delay.
Exam trap
Google Cloud often tests the distinction between log management (Cloud Logging) and error aggregation (Error Reporting), leading candidates to choose Error Reporting when the question explicitly asks for filtering and searching logs in real time.
How to eliminate wrong answers
Option A is wrong because Cloud Monitoring focuses on metrics, uptime checks, and alerting policies, not on filtering or searching raw log data in real time. Option B is wrong because Error Reporting automatically aggregates and analyzes application errors (e.g., stack traces) but does not provide a general-purpose log search or filtering capability for arbitrary log entries. Option D is wrong because Cloud Debugger allows you to inspect the state of a running application (e.g., capture snapshots and logpoints) without stopping it, but it is not designed for centralized log aggregation, filtering, or real-time search across multiple microservices.