Skip to content

Logging

Rifubo · ↑ security · ↑ operations

Emit API

  • Ambient Host leveled log API (shaped like wasi:logging: level + context + message).
  • Host stamps install id, package id, emitting version, and event correlation when present.
  • Not a capability — always available; still rate-limited.
  • Prefer errors/warnings about bad state; Apps must not log expected happy-path noise.
  • Admin configures Instance log level.

Stdout / stderr

Discard guest stdout/stderr — authors use the log API.

Readers and retention

  • Admin-only Instance-wide App log stream.
  • Default retain warn+; short retention + rate/size caps.
  • Client Wasm → Shell bridge → DevTools only (not the admin store) in v1.
  • Metrics/traces / guest OTel = vision.

Research: options and decision

Surveyed how Wasm hosts expect guests to emit observability signals.

Option Pros Verdict
wasi:logging-shaped leveled API Small Host-owned surface; attributable Chosen (ambient; Host stamps install/package/version)
Capture stdout/stderr Toolchain-friendly Rejected as default — unstructured; discard instead
Host-side OTel only Great for ops; no App spans Vision / Host ops later
wasi:otel guest export Rich traces Vision; guests must not open collector HTTP
Browser console via Shell Author DX on client DevTools only — not the admin audit stream

Decision: Host-mediated leveled logs only; attribute every signal to an install; never inherit_stdio across Apps; no guest HTTP to collectors. Admin-only Instance stream; default warn+; client ≠ multi-user audit log.

Research: wasm-logging-observability.