Ultimate access to all questions.
You are working with a government agency that requires archiving application logs for seven years. You need to configure Cloud Logging to export and store the logs while minimizing storage costs. What should you do?
(Note: "Stackdriver" has been updated to "Cloud Logging" to reflect current Google Cloud terminology, and minor phrasing adjustments have been made for clarity.)
Explanation:
The requirement is to archive logs for seven years using Stackdriver (now Cloud Logging) while minimizing storage costs. Option D is correct because:
Option A is incorrect: Bypassing Stackdriver and sending logs directly to Cloud Storage misses Stackdriver's built-in export features and may complicate log management. Option B is incorrect: BigQuery is optimized for analytics, not archival, and incurs higher storage/query costs compared to Cloud Storage for long-term retention. Option C is incorrect: Pub/Sub is a messaging service, not permanent storage; it doesn't retain logs long-term and requires additional setup for archival.