Google Cloud Associate Cloud Engineer — Question 123
You have deployed an application on a single Compute Engine instance. The application writes logs to disk. Users start reporting errors with the application. You want to diagnose the problem. What should you do?
Answer options
- A. Navigate to Cloud Logging and view the application logs.
- B. Connect to the instance's serial console and read the application logs.
- C. Configure a Health Check on the instance and set a Low Healthy Threshold value.
- D. Install and configure the Cloud Logging Agent and view the logs from Cloud Logging.
Correct answer: D
Explanation
The correct answer is D because installing and configuring the Cloud Logging Agent allows for centralized log management, making it easier to analyze application logs. Option A only provides access to logs that may not include all details without the agent. Option B involves a more manual and less efficient way of accessing logs. Option C is unrelated to diagnosing log issues, as it focuses on health checks rather than log retrieval.