Skip to main content

Audit logs

Recommendation
Updated
Moved
USE
2023-10-10

What is it

An immutable log that records the occurrence of events, for example changes to a resource.

Why we use it

To be able to trace what happened, when it happened, and who did it.

When to use it

A typical use is to store all changes to a resource in a service.

This is typically implemented by streaming change events from a service to BigQuery, using protobuf-bigquery-go, together with a list of all IAM members involved in the event.

It is important to be consistent with delivering at least one event for every mutation of a resource, to guarantee that the audit log is correct. Use the outbox pattern to fulfill this guarantee.

How to learn it