Free Google Associate Cloud Engineer Actual Exam Questions - Question 10 Discussion
BigQuery dataset called platform-logs. You have already installed the Stackdriver Logging agent on all
the instances. You want to minimize cost. What should you do?
Maybe A is worth considering since letting instances write directly to BigQuery might avoid extra moving parts, cutting costs and complexity compared to the Cloud Function routes.
C. This option is cleaner because exporting filtered logs directly to BigQuery avoids running extra compute resources, unlike B or D which add unnecessary complexity and cost.
Maybe C works best since setting a filter on the export sink directly targets Compute Engine logs, so you won’t pay for unrelated logs. B feels like overkill with the extra Cloud Function step.
C/D? C looks straightforward since you can create a sink directly to BigQuery with a filter, which should keep costs down by excluding non-Compute Engine logs. D seems too complicated and probably more expensive because it pulls logs daily and runs a query instead of streaming them. Also, D’s approach could miss real-time logs and introduce delays. So I’d go with C for simplicity and efficiency—it’s more native to Logging’s export feature and likely less overhead than spinning up Cloud Functions plus Pub/Sub like in B.
B imo, since Cloud Function lets you filter logs before loading to BigQuery, controlling costs well.
It’s C, since export sinks can filter logs by resource type, avoiding extra costs.
A seems unlikely since metadata changes alone don’t handle log routing to BigQuery.
C/B? C looks straightforward with filtering at export, which helps cut costs. B’s extra Pub/Sub and Cloud Function steps seem like added complexity and might increase expenses unnecessarily.
Actually, D seems too complicated and definitely more costly because it involves running a Cloud Function daily plus the BigQuery load for the query. B adds unnecessary overhead with Pub/Sub and Cloud Functions when you just want to export logs simply. A doesn’t even look valid since there’s no straightforward metadata key like logs-destination to send logs to BigQuery directly from instances. C keeps it straightforward by setting up a filtered export right in Stackdriver Logging, which is designed for this kind of use case and should minimize cost effectively.
Maybe C, since direct export avoids extra processing and potential delays.
Option B adds extra complexity with Cloud Functions and Pub/Sub that might increase costs and maintenance. Option C directly exports filtered Compute Engine logs to BigQuery, keeping it simple and likely cheaper than D’s daily batch jobs.
Maybe D could work too since it sets up a daily batch job to pull only the relevant Compute Engine logs into BigQuery. This approach avoids streaming costs by doing bulk inserts once a day instead of continuous export. Plus, you can control exactly what gets inserted with your query. It might be a bit more manual to set up with Cloud Functions and Scheduler, but it could save money in the long run by limiting how much data flows into BigQuery constantly.
B tbh, options A and D seem more complicated and could rack up costs because they involve extra processing or scheduled queries. C makes sense since Stackdriver’s export sink lets you filter logs before they get into BigQuery, so you only pay for what you store. B adds a Cloud Function, which adds overhead and likely more cost. Direct export with filtering in C is the cleaner and more cost-efficient approach here.
C, exporting directly filters logs before BigQuery storage, saving cost and complexity.
C imo, because exporting logs directly from Stackdriver to BigQuery lets you filter at the export stage, so only the Compute Engine logs get sent. This way, you avoid extra processing or storage costs from unnecessary logs. Options B and D add extra layers like Cloud Functions, which can increase costs and complexity. A isn’t valid since there’s no metadata setting that directs logs straight to BigQuery. So, going with the native export sink filtered by Compute Engine logs is the cleanest and most cost-effective method.
It’s C, exports directly filter logs before storing, so cheaper than using Cloud Functions.
It’s C for sure because creating an export sink directly in Stackdriver to BigQuery is straightforward and avoids extra processing costs. Options B and D add complexity with Cloud Functions, which will increase cost and latency. Option A looks like it’s trying to do something with instance metadata that doesn’t actually work for logging exports. With C, you can apply a filter on Compute Engine logs upfront, so you only store what you need in BigQuery. That saves money on storage and ingestion fees compared to capturing all logs first and filtering later.
C imo, creating a logs export directly from Stackdriver Logging to BigQuery seems the simplest way. Does anyone know if this automatically filters at ingestion to save costs?