Build Cloud Logging sink configurations for exporting logs to BigQuery, Cloud Storage, or Pub/Sub.
Build Cloud Logging sink configurations for exporting logs to BigQuery, Cloud Storage, or Pub/Sub with inclusion and exclusion filters.
Required Fields
namedestinationfilterOutput will appear here...A compliance team sets up a new BigQuery sink for security audit logs ahead of an upcoming SOC 2 audit, confirms the sink shows ACTIVE in the console, and moves on. Three weeks later, pulling a report for the auditor, the destination dataset has zero rows for the entire period, because the sink's writerIdentity was never granted BigQuery Data Editor on the dataset, an easy step to miss since sink creation doesn't fail or warn about it. They use the builder to double check the sink's filter and destination are correctly formed, grant the missing IAM role to the writerIdentity service account, and new log entries start landing in BigQuery within minutes, though the three-week gap for historical data has to be backfilled separately from raw log exports.
Build a Cloud Logging sink that routes matching log entries to BigQuery, Cloud Storage, or Pub/Sub, with inclusion and exclusion filters. The writerIdentity service account Cloud Logging generates for the sink must be separately granted write access on the destination (BigQuery Data Editor, Storage Object Creator, or Pub/Sub Publisher depending on destination type), sink creation succeeds regardless of whether that grant exists, so a sink can sit silently producing zero exported rows if the IAM step is skipped. Exclusion filters are evaluated before the sink's own destination cost accrues, so a well-tuned exclusion (dropping health-check or read-only access logs) is a direct lever on both noise and BigQuery/Storage spend.
The builder requires name, destination, and filter to resolve before accepting the JSON as a valid LogSink, the minimum fields the Logging API needs to know what to route, where, and under what match condition; it can't validate that the destination's IAM policy actually grants the sink's writerIdentity write access, that check only happens against the live resource.
The IAM grant on the destination is a separate step from sink creation and is the single most common reason a sink 'doesn't work' despite showing healthy status, always verify writerIdentity's permissions immediately after creating a sink, not after the first missing-data report.
bigqueryOptions.usePartitionedTables should almost always be true for anything beyond a short-lived sink, an unpartitioned destination table for a high-volume log sink becomes expensive to query and slow to prune well before anyone notices the storage bill creeping up.
Disabled exclusions (disabled: true) left in a filter list are easy to forget about during a review, since they read like active filters at a glance, verify the disabled flag specifically when auditing what a sink is actually excluding versus what someone intended to exclude.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.