Google Professional Cloud DevOps Engineer Question 122
Select 3Google Cloud PlatformYour organization is using Google Cloud Logging to monitor a high-throughput application that generates a large volume of logs. The logging costs have increased significantly, and your team has been tasked with optimizing logging costs while ensuring critical logs for debugging and monitoring are not lost. Which steps should you implement to achieve this goal?
- A
Implement log exclusions to filter out logs that are not needed for monitoring or debugging.
- B
Use log sampling to reduce the volume of redundant logs while retaining representative samples for analysis.
- C
Increase the retention period of all logs to ensure nothing is lost for future analysis.
- D
Use custom log sinks to route logs to a cost-efficient storage option like Cloud Storage or BigQuery.
- E
Disable logging for all resources to eliminate logging costs entirely.
Show answer and explanation
Correct answers: A, B, D
Explanation
To optimize logging costs, it is important to implement strategies such as log exclusions and sampling to reduce the volume of logged data, and to route logs to cost-efficient storage solutions using custom log sinks. These techniques allow you to manage costs effectively while retaining critical logs for monitoring and debugging purposes. Disabling logging or increasing retention periods is not advisable as it either compromises logging functionality or increases costs.
- A. Correct.
Correct: Log exclusions are a best practice for filtering out unnecessary logs, which can significantly reduce costs.
- B. Correct.
Correct: Log sampling is effective in reducing the volume of logs while ensuring critical patterns and issues can still be analyzed.
- C. Incorrect.
Incorrect: Increasing the retention period will increase storage costs, contradicting the goal of reducing costs.
- D. Correct.
Correct: Custom log sinks allow you to route logs to more cost-efficient storage solutions like Cloud Storage or BigQuery, which can help manage costs.
- E. Incorrect.
Incorrect: Disabling logging entirely is not a viable solution as it compromises the ability to monitor and debug the application.