Skip to main content
Every transition the orchestrator drives — provisioning, starting, stopping, restarting, rotating keys, destroying — writes a row to the audit_log table. This is the durable record of what happened to the fleet. It’s the first place to look during an incident and the data behind every fleet metric.

Schema

Actions

The list grows. New actions are additive — old log entries stay valid.

Common queries

Recent activity for one engine

The first place to look when a user reports something weird with their engine.

Provisions in the last hour

Same query the /metrics endpoint runs. Useful for capacity planning.

Auto-restart hot spots

Engines restarting frequently are usually misconfigured (wrong key, bad image) or genuinely buggy.

Activity by actor

Useful for “who’s been active?” — products vs system actions vs admins.

A specific user’s lifetime

Reconstructs everything that ever happened to that user’s engine. Useful for support investigations.

Metadata conventions

The metadata JSONB has different shape per action:

provision

health_failed

auto_restart_failed

admit_denied

The metadata fields are stable per action — additive changes only.

Retention

audit_log grows. Without cleanup, it fills the database. A reasonable retention policy:
Run weekly. Vacuum periodically. For longer compliance needs, export to a long-term store (S3, BigQuery) before deletion. The orchestrator doesn’t ship an exporter today; a small script that streams audit_log to your stack handles it.

What’s not in the audit log

  • Engine /execute calls. The orchestrator doesn’t see them; the product calls the engine directly. Per-call telemetry lives in the engine’s observability_events.
  • Postgres-internal events like vacuum, autovacuum, and so on.
  • Orchestrator startup and shutdown. Logged to stdout instead.
If you want a unified timeline across orchestrator + engine, combine audit_log (orchestrator) with observability_events (engine) on engine_id.

See also

  • Health — what triggers auto_restart_* actions.
  • Lifecycle — what triggers provision/stop/etc.
  • Policy — what triggers admit_denied/provision_denied.
  • API reference — every endpoint that produces audit rows.