A single Compute Engine instance runs your app and writes logs to disk. Users report errors and you need to diagnose the problem. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Install and configure the Cloud Logging agent on the VM and view the logs in Cloud Logging..
Why this is the answer
The correct answer is to install and configure the Cloud Logging agent. The Cloud Logging agent (Ops Agent) is necessary to stream application logs from a Compute Engine instance to Cloud Logging. Once configured, you can then view and analyze these logs in Cloud Logging to diagnose the reported errors. Navigating directly to Cloud Logging without the agent installed will not show your application logs, as they are still only on the instance's disk. Connecting to the instance serial console is primarily for troubleshooting boot issues or interacting with the OS, not for efficiently viewing application logs, especially if the application is running. Configuring a health check monitors instance availability but doesn't provide insight into application-level errors or logs.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed