memory_host_resident_bytes as unavailable (null, None, or nil, depending on the SDK). Host residency can change even when guest execution is stopped, so the runtime does not reuse the previous value. Other metrics continue to be sampled; residency sampling returns on the next sample after resume.
OCI sandboxes also expose optional upper filesystem fields for capacity dashboards. Guest-visible upper_used_bytes and upper_free_bytes are available when the protected bundled-kernel reporter is fresh. Host-observed upper_host_allocated_bytes is available when microsandbox can inspect the writable upper image from the host. SDKs surface those as nullable fields (Option, null, None, or nil) because custom kernels and non-OCI roots may not provide them.
Need continuous shipping to Grafana, Datadog, Prometheus, or any other OTel-compatible backend? See
msb-metrics, a sidecar binary that reads the same data and ships it over OTLP.Point-in-time
Streaming
Subscribe to metric updates at a regular interval. Each update arrives as a separate event.Fleet-wide metrics
Get the latest metrics for every running sandbox at once. Useful for dashboards or capacity planning.Metrics reports (Rust)
The Rust SDK additionally exposes reports: metrics joined with catalog context for presentation. A report resolves the CPU and memory allocations from the sandbox’s active config, so live resizes are reflected. It also carries a state field:Running, Stalled (runtime alive but no sample within three sampling intervals), or Exited (the preserved terminal sample of a stopped sandbox). This is what msb metrics renders.
Rust
Reference
For exact per-sandbox metrics APIs, see TypeScript, Rust, Python, or Go. For local reports and fleet snapshots, seemsb metrics.