adding-audit-events
Adding Audit Events
AuditEventTable in packages/types/lib/audit-trail/event.ts is the source of truth: it maps each
resource to its actions and the metadata each may carry. The event union, the metadata lookup, the
per-resource action lists and the webapp filters all derive from it. Add the action there first and let
the compiler tell you what else to touch.
The trail is control-plane only — configuration, state and authentication. Runtime traffic (records, proxy, sync execution) is data plane and stays out; audit it and you get millions of rows a month.
Workflow
-
Vocabulary — in
AuditEventTable, under the resource:<action>: <MetadataShape>;or<action>: never;when the action carries no metadata. -
Metadata shape, if any —
packages/types/lib/audit-trail/metadata.ts. Name it for what it holds, never for one action:integration.createdandintegration.deletedshareIntegrationProviderMetadatabecause both record only the provider.