Google Cloud Professional Cloud Developer — Question 16
You want to use the Stackdriver Logging Agent to send an application's log file to Stackdriver from a Compute Engine virtual machine instance.
After installing the Stackdriver Logging Agent, what should you do first?
Answer options
- A. Enable the Error Reporting API on the project.
- B. Grant the instance full access to all Cloud APIs.
- C. Configure the application log file as a custom source.
- D. Create a Stackdriver Logs Export Sink with a filter that matches the application's log entries.
Correct answer: C
Explanation
The correct first step is to configure the application log file as a custom source, which allows the Stackdriver Logging Agent to know how to read and send the logs. Enabling the Error Reporting API and granting full access to all Cloud APIs are not necessary for the logging agent to function. Creating a Stackdriver Logs Export Sink is also not the initial step, as the logs need to be configured and sent first before filtering and exporting them.