Send all Compute Engine instance logs to a BigQuery dataset named platform-logs; Cloud Logging agent is installed on all instances and cost must be minimized. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: In Cloud Logging create a filter for Compute Engine logs and Create Export selecting BigQuery as the sink service and the platform-logs dataset as the sink destination..
Why this is the answer
The most efficient and cost-effective method is to use a Cloud Logging sink. This allows you to directly export filtered logs to BigQuery without intermediary services or custom code. Cloud Logging sinks are designed for this exact purpose, providing a managed and scalable solution. The other options are less optimal: Giving BigQuery Data Editor role and updating instance metadata is not how Cloud Logging exports work; it's for direct application writes, not system logs. Using Cloud Pub/Sub and Cloud Functions adds unnecessary complexity and cost for processing and routing logs that Cloud Logging can handle natively. A daily Cloud Function with an INSERT job would be inefficient, expensive, and would not provide real-time or near real-time log availability.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed