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?
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.
Disclaimer
This is a practice question. There is no guarantee of coming this question in the certification exam.
Answer
D
Explanation
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.
(This allows you to export logs from Stackdriver to a long-term storage bucket in Cloud Storage, which is a cost-effective option for long-term storage. Additionally, you can use Stackdriver’s export feature to schedule regular exports and configure retention policies to keep the logs for the required seven years.
https://cloud.google.com/logging/docs/routing/overview#destinations)