
Answer-first summary for fast verification
Answer: Create a sink in Stackdriver, name it, create a bucket on Cloud Storage for storing archived logs, and then select the bucket as the log export destination.
The requirement is to archive logs for seven years using Stackdriver (now Cloud Logging) while minimizing storage costs. Option D is correct because: 1. Creating a sink in Stackdriver allows exporting logs to Cloud Storage, which supports long-term archival. 2. Cloud Storage offers cost-effective storage classes like Archive or Coldline for infrequently accessed data, aligning with the seven-year retention need. 3. This approach uses native GCP tools without custom development, reducing operational overhead and ensuring reliability. 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.
Author: LeetQuiz Editorial Team
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.)
A
Create a Cloud Storage bucket and develop your application to send logs directly to the bucket.
B
Develop an App Engine application that pulls the logs from Stackdriver and saves them in BigQuery.
C
Create an export in Stackdriver and configure Cloud Pub/Sub to store logs in permanent storage for seven years.
D
Create a sink in Stackdriver, name it, create a bucket on Cloud Storage for storing archived logs, and then select the bucket as the log export destination.
No comments yet.