GCP Associate Cloud Engineer Practice Question 78: Logging Exclusion Filter Cost

Google Cloud Associate Cloud Engineer · Test 8 · question 8 of 10

Cloud Loggingmedium

A project's _Default log sink is ingesting a large volume of high frequency health check log entries from a load balancer, driving up Cloud Logging costs. The team still wants all other application and audit logs to be retained normally. What should they do to reduce cost with the least impact on other logs?

Select one answer
Show answer and explanation

Answer:

  • D. Add an exclusion filter on the _Default sink that matches the health check log entries so they are not stored, while everything else continues to flow normally.

An exclusion filter drops log entries that match a specified query before they are ingested and billed for storage in a log bucket, while every entry that does not match the filter continues to flow into the sink as before. Targeting the exclusion at the health check entries removes the high volume, low value logs without touching anything else.

Option A removes routing for every log type, including the audit and application logs the team wants to keep, which is far more disruptive than necessary. Option B reduces retention for all logs in the bucket, not just the noisy ones, and touching retention does not reduce the ingestion volume that drives the bulk of Cloud Logging cost. Option C removes visibility into platform and audit logs entirely and is not a targeted fix for one noisy log source.

Reference: Cloud Logging cost management best practices

Practice Test 8 ›

Study guides for Google Cloud Associate Cloud Engineer