Skip to main content

Module schema

Module schema 

Source
Expand description

Schema definitions for BIRD tables.

§BIRD v5 Schema

The v5 schema splits invocations into attempts + outcomes:

  • attempts: Record of invocation start (cmd, cwd, timestamp, etc.)
  • outcomes: Record of invocation completion (exit_code, duration, etc.)
  • invocations: VIEW joining attempts LEFT JOIN outcomes with derived status

Status is derived from the join:

  • pending: attempt exists but no outcome
  • completed: outcome exists with exit_code
  • orphaned: outcome exists but exit_code is NULL (signal/crash)

Structs§

AttemptRecord
An attempt record (the start of a command execution).
EventRecord
An event record (a parsed log entry from an invocation output).
InvocationRecord
An invocation record (a captured command/process execution).
OutcomeRecord
An outcome record (the completion of a command execution).
OutputRecord
An output record (stdout/stderr from an invocation).
SessionRecord
A session record (a shell or process that captures invocations).

Constants§

ATTEMPTS_SCHEMA
SQL to create the attempts table (v5 schema).
BIRD_INVOCATION_UUID_VAR
Environment variable for sharing invocation UUID between nested BIRD clients.
BIRD_META_SCHEMA
SQL to create the bird_meta table for schema versioning.
BIRD_PARENT_CLIENT_VAR
Environment variable for the parent BIRD client name.
BIRD_SCHEMA_VERSION
Current BIRD schema version.
EVENTS_SCHEMA
SQL to create the events table schema (for documentation/reference).
INVOCATIONS_SCHEMA
SQL to create the invocations table schema (for documentation/reference).
INVOCATIONS_VIEW_SCHEMA
SQL to create the invocations VIEW (v5 schema).
OUTCOMES_SCHEMA
SQL to create the outcomes table (v5 schema).
SESSIONS_SCHEMA
SQL to create the sessions table schema (for documentation/reference).