v0.3.0 — Quota & metering primitives
Quota, usage, and metering primitives for applications that build their
own per-end-user limit or billing logic on top of Daytona's org-level
enforcement. Read primitives only — the SDK ships no tenant policy.
Added
ExDaytona.Quota— normalized org quota truth:overview/2
(snapshot/volume gauges + per region × sandbox-class used-vs-total for
cpu/memory/disk/gpu with per-sandbox maxima),headroom/3(remaining
capacity per dimension, with known-combination hints on miss), and
limits/2(org per-sandbox maxima, secret quota, and
create/lifecycle/API rate limits).- Metering primitives on
ExDaytona.Platform(analytics API, connection
derived automatically):usage_aggregated/4,usage_per_sandbox/4
(the per-sandbox CPU-seconds/RAM-GB-seconds/disk/price rows that
application-defined scopes roll up), andusage_chart/5. ExDaytona.Sandbox.list/2acceptslabels:as a map (JSON-encoded
into the server-side filter) — the attribution primitive for scoping
sandboxes to application-defined identities via labels set at create
time. Pre-encoded strings still pass through.
Live-verified contracts
- The analytics metering endpoints accept plain API keys — verified
against production. Quota.limits/2reads the organization record, which is JWT-gated
(401 with API keys, documented); API-key callers get the per-sandbox
maxima fromQuota.overview/2instead.
All gates green: 356 tests, dialyzer/credo/docs clean, 96.6% coverage, CI incl. Elixir 1.18/OTP 27 matrix, and the full live suite (8/8) against app.daytona.io.