Google Cloud Professional Cloud DevOps Engineer — Question 62
You are working with a government agency that requires you to archive application logs for seven years. You need to configure Stackdriver to export and store the logs while minimizing costs of storage. What should you do?
Answer options
- 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.
Correct answer: D
Explanation
Option D is correct because it allows you to create a sink in Stackdriver that directs logs to a specified Cloud Storage bucket, efficiently handling log archiving for the required duration. Option A does not utilize Stackdriver's capabilities for log management, while Option B introduces unnecessary complexity by using BigQuery. Option C also deviates from the requirement by using Cloud Pub/Sub, which is not the most cost-effective solution for long-term log storage.