
Answer-first summary for fast verification
Answer: Create an aggregated log sink in the Dev and Prod folders.
To minimize the number of log sinks while ensuring logs from development projects go to `dev_dataset` and production projects to `prod_dataset`, and to automatically include future projects: - **Option A (single org-level sink)**: Exports all logs to one dataset, failing to separate dev/prod data. - **Option B (sink per project)**: Requires creating and managing sinks individually for every project, increasing overhead and not scaling well for future projects. - **Option C (two org-level sinks with project ID filters)**: Uses project IDs in filters, but future projects won’t be included automatically (filters would need manual updates). - **Option D (folder-level sinks)**: Creating one aggregated sink in the Dev folder and one in the Prod folder ensures: - Logs from all projects in Dev (current and future) export to `dev_dataset`. - Logs from all projects in Prod export to `prod_dataset`. - Only two sinks are needed, minimizing management. - Folder-level sinks automatically inherit to new projects in those folders, fulfilling the requirement for future projects. Thus, Option D is optimal.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You need to create Cloud Logging sinks to export log entries from development projects in the Dev folder to dev_dataset and from production projects in the Prod folder to prod_dataset. The solution must minimize the number of sinks while ensuring they apply to future projects. What is the recommended approach?
A
Create a single aggregated log sink at the organization level.
B
Create a log sink in each project.
C
Create two aggregated log sinks at the organization level, and filter by project ID.
D
Create an aggregated log sink in the Dev and Prod folders.