Google Professional Cloud DevOps Engineer Question 243
Select 3Google Cloud PlatformYour team is troubleshooting an issue where API requests to a Google Cloud-based application are intermittently failing. To identify the root cause, you decide to analyze the logs using Cloud Logging. Which of the following approaches will help you effectively identify the problem?
- A
Create a logs-based metric to monitor the frequency of error logs over time.
- B
Use the Log Explorer to filter logs by severity levels such as ERROR or WARNING.
- C
Export logs to Cloud Storage for long-term retention and offline analysis.
- D
Set up an alerting policy in Cloud Monitoring to notify the team when error log rates exceed a threshold.
- E
Enable VPC Flow Logs for the subnets where the application is deployed.
Show answer and explanation
Correct answers: A, B, D
Explanation
For effective log analysis, you should focus on tools and features that allow you to filter and analyze logs in real time and set up proactive monitoring. Creating logs-based metrics and using the Log Explorer are essential for identifying patterns and filtering critical information. Alerting policies tied to error rates ensure the team can respond promptly to issues as they arise. While VPC Flow Logs and log exports have their use cases, they do not directly contribute to resolving the application issue in this scenario.
- A. Correct.
Creating a logs-based metric is an effective way to monitor trends in error log occurrences and helps identify patterns that may point to the root cause.
- B. Correct.
Using the Log Explorer to filter logs by severity allows you to focus on logs that are critical to diagnosing the issue, such as ERROR or WARNING-level logs.
- C. Incorrect.
While exporting logs to Cloud Storage is useful for long-term analysis, it is not directly helpful for real-time troubleshooting of the current issue.
- D. Correct.
Setting up an alerting policy based on logs-based metrics helps the team stay informed about error surges, which can assist in identifying and responding to the issue quickly.
- E. Incorrect.
Enabling VPC Flow Logs is useful for analyzing network traffic but does not directly help in diagnosing application issues based on logs within Cloud Logging.