Skip to main content
Your staging environment is namespaces under a staging prefix, in the same organization as production. It gets its own key, its own budgets and, if you use them, its own templates. Judging there is billed like judging in production. Mark the prefix non-production, and its tenants add nothing to the tenant fee or to production’s calibration. default/quickstart is not a staging environment. It is a free place to try things, with a small monthly limit (pricing). Point your staging deployment at a prefix of its own.

A layout

Mirror production’s names under another environment prefix (see tenants and environments):
  • The key. Give your staging deployment only the acme/staging/* key. It can’t read or change anything in production, and it can’t mark or unmark prefixes. Create keys on the dashboard’s Keys page. A scope can name a prefix before anything under it exists.
  • The template. Define staging’s judgments on acme/staging/*, so every staging tenant has them, as production’s are on acme/prod/*. Templates need the Team plan, in staging as in production.
  • The budget. A budget is a namespace setting; there is none on a prefix. A namespace exists from its first write, so set the budget with PATCH /namespaces/{ns} (ns.update(budget=...)) when you provision each staging tenant. With pause, a staging tenant that reaches its budget stops judging and its answers read stale; writes continue.

Mark the prefix non-production

Admins and owners mark prefixes in the dashboard, under Settings → Non-production prefixes; every member can see the list. With the API, marking and unmarking take a read_write key scoped to your whole organization (*), and any key of the organization can list:
These are PUT /nonproduction-prefixes/acme%2Fstaging%2F, GET /nonproduction-prefixes and DELETE /nonproduction-prefixes/acme%2Fstaging%2F. All three return the list:
  • A prefix is namespace characters ending in /. acme/staging/* is accepted and stored as acme/staging/. It can’t be the whole organization.
  • It needs no namespaces yet. Mark it before staging’s first judgment.
  • Up to 20 prefixes are marked at once. Marking a marked prefix, or unmarking one that isn’t marked, changes nothing.
  • Each change is in your audit log as org.nonproduction.

What it changes

  • The tenant fee. A namespace counts only if it had a billed judgment in an hour it wasn’t under a marked prefix. Marking takes effect from the next whole UTC hour, and unmarking from the start of the hour it happens in. So marking late in the month exempts nothing already judged. The invoice line says what was left out: “Active tenant namespaces: 1,600 (25 included; 1,600 non-production not counted)”. See staging tenants don’t count for a whole bill.
  • Calibration. A template’s calibration pool leaves out tenants under a marked prefix: their outcomes shape neither its pooled calibration nor the prior that tenants’ own fits shrink toward. They read the pool, and get no fit of their own; their calibration report says tenant.reason: "non_production". This matters when one template covers both environments, such as acme/*. A template under the marked prefix, such as acme/staging/*, pools its staging tenants among themselves, so staging is calibrated like production without touching it.
  • Nothing else. Judging, storage, writes and queries under a marked prefix are billed as usual, and shadow reports sample its tenants as usual.

Promote a change from staging to production

A judgment change reaches production the way it reached staging: you create the same definition on the production prefix, and a shadow report on production’s own documents decides the switch. There is no route that copies a judgment from one prefix to another, so keep the definition in your code.
  1. In staging, create the new version on acme/staging/* with the staging key, by posting the definition again under the same name. It stays inactive.
  2. Activate it there. You get one shadow job, sampled across the staging tenants. Read its report, then confirm it to switch every staging tenant, and test your staging deployment against it.
  3. In production, create the same definition on acme/prod/* with the production key. Versions are numbered per template, so its number there can differ.
  4. Activate it on acme/prod/* and read that shadow report, sampled across production tenants. Confirm it to switch every production tenant, or cancel it to leave production as it was.
Don’t force the production activation. Staging’s report was measured on staging’s documents, and production’s can shift differently. Shadow reports are free on both.

Keep staging data synthetic

Staging documents are judged like production’s, so the engine’s provider sees them: each engine’s page names who handles your data. Use synthetic or scrubbed records in staging where you can, rather than copies of production data.