Get Your CertGoogle Cloud Professional Cloud DevOps EngineerPlayCompete
‹ All Google Cloud Professional Cloud DevOps Engineer questions

GCP Professional Cloud DevOps Engineer Practice Question 10: Logging Ingestion Cost Exclusions

Google Cloud Professional Cloud DevOps Engineer · Test 1 · question 10 of 10

Performance & Cost Optimizationmedium

Cloud Logging charges have tripled since a new fleet went live. Analysis shows that about 70% of ingested volume is successful (HTTP 200) load balancer request logs and application DEBUG entries that nobody has queried in months. Compliance separately requires that Admin Activity audit logs remain available for well over a year. The team needs the bill down quickly and is not willing to lose the audit logs.

What should they do?

Select one answer
Show answer and explanation

Answer:

  • A. Edit the _Default sink to add exclusion filters matching the successful load balancer requests and the DEBUG entries, so those entries are not ingested into the log bucket and are not billed, leaving the _Required sink and its audit logs untouched

Cloud Logging bills primarily on the volume of log data ingested into log buckets, so the lever that actually moves the bill is ingesting less. The _Default sink can be modified, and adding exclusion filters to it stops matching entries from being routed to the _Default bucket, so they are neither stored nor charged. High-volume, low-value entries (successful load balancer requests and DEBUG lines nobody reads) are the textbook candidates, and an exclusion can be applied partially (sampling a percentage) if the team wants to keep a representative sample. The compliance requirement is unaffected, because Admin Activity audit logs are routed by the _Required sink to the _Required bucket, which retains them for 400 days at no charge.

Option B misidentifies the cost driver. The first 30 days of retention in the _Default bucket is included in the ingestion price, so shortening retention from 30 to 7 days saves nothing while throwing away recent logs the team does still query. Retention charges only start to matter beyond the default period.

Option C adds cost rather than removing it. The entries are still ingested and billed on the way through, the Cloud Storage copies incur their own storage charges, and the team loses Logs Explorer and log-based metrics over the data it archives.

Option D is not possible: the _Required sink cannot be modified or deleted. It exists precisely so that Admin Activity, System Event, and Access Transparency logs are always captured, and since those logs are not charged for ingestion, removing them would not have reduced the bill anyway.

References: Exclude log entries from a sink; Google Cloud Observability pricing

Practice Test 1 ›

Study guides for Google Cloud Professional Cloud DevOps Engineer