You need instant notifications to your monitoring tool when new rows are appended to a specific BigQuery table by insert jobs, without alerts for other tables. How do you implement this with Stackdriver (Cloud Logging)?
Choose an answer
Tap an option to check your answer.
Correct answer: Using the Stackdriver API, create a project-level log sink with an advanced log filter that exports to Pub/Sub and subscribe your monitoring tool to that topic..
Why this is the answer
The correct approach is to use the Stackdriver API to create a project-level log sink with an advanced log filter that exports to Pub/Sub. This allows you to specifically filter for BigQuery insert jobs affecting the target table, ensuring only relevant events are captured. Your monitoring tool can then subscribe to this Pub/Sub topic for instant notifications. Calling the Stackdriver API to list all logs and apply an advanced filter is inefficient and doesn't provide instant notifications. Enabling a log sink that exports logs to BigQuery would store the logs in BigQuery, but wouldn't provide real-time alerts to your monitoring tool. Creating a log sink exporting to Cloud Pub/Sub in the console is a valid step, but the API offers more programmatic control and automation for setting up the specific advanced filter needed for this scenario.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed