-
Notifications
You must be signed in to change notification settings - Fork 0
Observability and Traceability
The project uses structured, non-secret events to connect a source revision, an OCI build, CI evidence, a Kubernetes admission decision, and runtime requests.
| Field | Meaning |
|---|---|
time |
UTC RFC3339 timestamp |
level |
DEBUG, INFO, WARN, or ERROR
|
component |
stable producer such as cmd/oci-builder, internal/oci, microvm-init, or ci
|
operation |
stable high-level activity (build, serve, supervise, evidence-publication) |
phase |
position inside the operation |
trace_id |
correlation identifier, never an authentication token |
duration_ms |
elapsed phase/build duration when meaningful |
message |
human-readable summary |
Levels are used consistently:
-
DEBUG: lifecycle detail useful for diagnosis (input sizes, phase transitions, descriptor generation); -
INFO: expected state transitions and successful outcomes; -
WARN: recoverable abnormal state, such as a forwarded signal or running microVM init outside PID 1; -
ERROR: failed validation, build, child process, or poweroff.
cmd/oci-builder writes JSON events to stderr while preserving its existing
human-readable success line on stdout. Set SECURE_OCI_TRACE_ID to propagate a
pipeline identifier; otherwise the CLI creates a random 128-bit identifier.
The library exposes Options.TraceID, Options.Observer, and structured
oci.Event values. It reports paths, counts, sizes, phases, durations, and
digests, but never file contents, labels' secret values, environment variables,
or credentials. Observer data is not written into the image, so it cannot
change reproducible bytes.
cmd/example-service accepts an X-Request-ID up to 128 characters or creates
a random identifier. It returns the identifier in the response header and
includes it as trace_id in the structured request log alongside status,
duration, and response bytes.
At an ingress or service mesh, generate X-Request-ID once and preserve it
between hops. Do not place user data, credentials, session tokens, or raw
trace-context baggage in this header.
Kernel preparation and guest boot use timestamped phase tags. CI separates the potentially long kernel build from QEMU boot, streams the guest console, emits network-wait heartbeats, and bounds download, compile, boot, and HTTP smoke-test operations with explicit timeouts.
Artifacts include kernel-build.txt, microvm-boot.txt, the resolved kernel
configuration, and traceability.json.
scripts/ci/write-traceability.py creates a schema-versioned JSON manifest:
- repository, commit, ref, workflow, run ID/attempt, actor, runner OS/arch;
- SHA-256 and byte size for every available evidence file;
-
trace_idequal to the GitHub run ID.
Benchmark, OCI validation, compatibility, and MicroVM artifacts include this manifest. Release workflows additionally retain publication digest, signature, SBOM/provenance, and layout checksum evidence.
Examples for a JSON log backend:
trace_id = "<run-or-request-id>"
component = "internal/oci" AND level = "ERROR"
operation = "build" AND phase = "complete"
component = "example-service" AND duration_ms > 500
component = "microvm-init" AND level IN ("WARN", "ERROR")
Alert on build/admission errors, repeated MicroVM network-wait exhaustion, signature verification failure, and elevated service error/latency rates. Debug events may have shorter retention; security and release evidence should follow the organization's audit-retention policy.
© 2026 CYPT71
platform-factory
Core
- Architecture and OCI Layout
- Next-generation Architecture
- Architecture Decision Records
- Security Model
- Threat Model and Residual Risks
- Independent Security Review Process
- CLI Reference
- Project Configuration and Dependency Freezing
- mTLS Configuration
- Meine Graal
CI/CD
Running an image
- Production Adoption Guide
- Dockerfile Consumer
- Local Dev (Podman/macOS)
- MicroVM Support
- MicroVM Administration
- Large-image streaming
Operating