Google Cloud Associate Cloud Engineer — Question 278
Your company is seeking a scalable solution to retain and explore application logs hosted on Compute Engine. You must be able to analyze your logs with SQL queries, and you want to be able to create charts to identify patterns and trends in your logs over time. You want to follow Google-recommended practices and minimize your operational costs. What should you do?
Answer options
- A. Use a custom script to push your application logs to BigQuery for exploration.
- B. Ingest your application logs to Cloud Logging by using Ops Agent, and explore your logs in Logs Explorer.
- C. Ingest your application logs to Cloud Logging by using Ops Agent, and explore your logs with Log Analytics.
- D. Use a custom script to push your application logs to Cloud SQL for exploration.
Correct answer: C
Explanation
Option C is correct because ingesting logs to Cloud Logging with Ops Agent allows for effective log management, and Log Analytics provides the capability to analyze logs using SQL-like queries. Option A is less efficient since it requires a custom script, and while B provides log exploration, it lacks the advanced analytical capabilities of Log Analytics. Option D is not suitable as Cloud SQL is not designed specifically for log analysis.