Google Cloud Professional Cloud DevOps Engineer — Question 109

You are building and running client applications in Cloud Run and Cloud Functions. Your client requires that all logs must be available for one year so that the client can import the logs into their logging service. You must minimize required code changes. What should you do?

Answer options

Correct answer: D

Explanation

The correct answer is D because creating a logs bucket with a retention period of 365 days meets the requirement for log availability while minimizing code changes. Options A and C involve more extensive modifications to the application code, and option B does not ensure that logs are retained for the required duration.