Skip to main content
Query resource usage for a running sandbox: CPU, memory, and more. Get a single point-in-time snapshot, or open a streaming subscription that delivers updates at a fixed interval. 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.
Fleet snapshots only include sandboxes whose runtime process is actually alive. A runtime that crashed without cleanup used to keep reporting its last sample as if the sandbox were running; readers now detect the dead owner and retire the entry on first read.

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
Report APIs for TypeScript, Python, and Go will follow.