
Explanation:
Option B is correct because creating a custom log-based metric for the specific error and using it in an Alerting Policy enables real-time notifications if the error recurs. This directly addresses the need for immediate alerts. Option A, while useful for log analysis, does not provide alerting capabilities. Option C allows for viewing relevant logs but lacks notification features. Option D is not recommended as it violates the principle of least privilege by granting excessive permissions, which does not solve the alerting requirement. For more details, refer to Google Cloud's documentation on logs-based metrics and error reporting notifications.
Ultimate access to all questions.
No comments yet.
As a member of the on-call SRE team for an E-commerce startup, you've identified that a Service Account with insufficient permissions caused site errors. After resolving the issue, how can you ensure you're alerted if it happens again?
A
Export all logs to BigQuery via a log sink and create a Data Studio report for analysis.
B
Set up a custom log-based metric for the error and incorporate it into an Alerting Policy.
C
Navigate to Log Viewer, apply a filter for 'Error' severity and the Service Account's name.
D
Assign Project Owner access to the Service Account to prevent future permission issues.