
Answer-first summary for fast verification
Answer: Configure the application log file as a custom source.
After installing the Stackdriver Logging Agent, the next critical step is to configure the agent to recognize the application's log file as a custom source. The agent (Fluentd-based) requires explicit configuration to collect logs from non-default locations or custom formats. Options A and B are unnecessary because enabling the Error Reporting API or granting full API access is not a prerequisite for logging. Option D (creating a sink) relates to exporting logs after they are already in Stackdriver, which occurs after the logs are ingested. Thus, the first action is configuring the custom log source (C).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To send an application's log file to Stackdriver Logging from a Compute Engine instance using the Stackdriver Logging Agent, what is the first step you should take after installing the agent?
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.
No comments yet.