Skip to content

v0.3.0 — Quota & metering primitives

Choose a tag to compare

@github-actions github-actions released this 01 Sep 01:06
· 10 commits to main since this release

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), and usage_chart/5.
  • ExDaytona.Sandbox.list/2 accepts labels: 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/2 reads the organization record, which is JWT-gated
    (401 with API keys, documented); API-key callers get the per-sandbox
    maxima from Quota.overview/2 instead.

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.

📦 hex.pm/packages/ex_daytona · 📚 hexdocs.pm/ex_daytona