Repository navigation
Conversation
…atalog The mock now bills by the pricing proposal. A price catalog holds the plans, the per-user meters with their allowances and the lines billed on top; bill() prices a month as the larger of Pro's minimum and the metered usage, plus what is billed on top, and Free while nothing needs Pro. The mock team's usage is one month of the proposal's example B2B SaaS, spread over the month's hours for report-usage, so Settings → Billing in previews shows each meter's amount and the month's estimate. The contract renames Plan.base_amount to minimum_amount and adds UsageLine.amount and TeamBilling.estimate. Directory.applyPlan becomes applyEntitlements, with the catalog's allowances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…that commit late The event shipper and forward pages of GET /events?order=asc read (created_at, id) > cursor. An event whose transaction commits after the reader has passed it sorted behind the cursor and was never read. On Postgres created_at was now(), the transaction's start, so any Path B mutation that started first and committed last lost its events from webhook and stdout sinks. Forward readers now list only settled events: those no open transaction can still commit an event before. - Postgres stamps clock_timestamp() after taking a shared advisory lock keyed by the project and the second; the transaction holds it until it ends. EventsSettledBefore reads the oldest such second from pg_locks, so an open writer holds back only its own project. - Spanner stamps the commit timestamp (migration 000042), so every committed event is settled. - SQLite raises the stamp past the project's newest stored event, under its single write lock. ListEventsAfterCursor and the API's ascending list apply the bound. ADR 049 gets an amendment stating the guarantee and the rejected options (a safety lag, an xmin guard, pg_stat_activity). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… screen The cloud functions price each team's mock usage per project and UTC day from the catalog, and the add-on draws it as Vercel's usage page does: the plan's credit, a stacked chart of what each day added, and a table per meter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h GET /usage The server counts usage from its own events into rollup tables (ADR 086): a projector reads each project's settled events of the meters' types, counts a user once a month in the hour of their first sign-in, and moves its cursor in the transaction that counts the batch, so a crash or a second run counts nothing twice. GET /usage serves a project's days or hours, how far they are final, and the team that claimed it, counts only. - Postgres, Spanner and SQLite: usage_first_seen, usage_hours and usage_cursors, with stmttest suites. Spanner bounds a read by its strong read's timestamp; SQLite never stamps an event before its project's cursor. - The projector runs on its own loop, or per call to /cron/usage with usage.trigger_secret, as the purge does; the hosted cloud's launcher and Vercel Cron Job set it up. - While usage is counted (usage.enabled, on by default), the purge keeps every event the projector has not counted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the cloud's add-on Usage moves from the hosted cloud's Settings into the console's own project sidebar, since a self-hosted deployment counts its usage too: the screen reads GET /usage for the selected project and draws each UTC day with shadcn's chart (Recharts, through the pnpm catalog), daily or cumulative, with each meter's month in a table. Prices are the add-on's: a new optional slot, usagePrices (Console ADR 0006), lets the cloud's build add what each day costs. The cloud functions now read the person's projects' usage live and price it per team, and the add-on hands the console the project's share. Billing keeps the team's credit bar; the add-on's own Usage screen is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
🦋 Changeset detectedLatest commit: ec84c12 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…e a plain first sentence - gofmt internal/audit/usage_test.go and internal/storage/stmttest/main_test.go (server:format). - ADR 086 becomes 085: the index check wants contiguous numbers, and 085 is free on this branch's base. #2468 also proposes an 085, so whichever lands second renumbers. - getUsage's description opened with `[from, to)`, which the docs reject in a page description; its first sentence now reads as plain text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-catalog-mock # Conflicts: # internal/service/statement.go # internal/storage/dialect/sqlite/event.go
…d-on Enterprise now keeps audit events 90 days by default, Free 7 and Pro 30 as before. Each retention meter names the days it keeps (retention_days, in the schema), and entitlementsFor no longer sells a plan the retention it keeps anyway: Enterprise is offered the 400-day retention only. The meters count from the plan's own days rather than from 30. The price list is now 2026-10-31.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Customers run the login component in their own app, on their own domain, so a domain for a login Zitadel hosts prices something they do not use. The catalog loses the custom_domain_extra line and the plans' custom_domains_included, and bill() no longer charges for domains or counts one as a reason to need Pro. The price list is now 2026-10-31.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Usage stays cheap, and the features companies buy for their own reasons move toward WorkOS's and Clerk's prices: - SSO users $0.10, counting at most 750 per connection, so a connection costs at most $75 a month; 1,000 stay free. - Directory users get their own meter, at the same price and cap. - Advanced bot checks $2 per 1,000 (BotID costs $1). - Retained users $0.005 to 90 days and $0.015 to 400 days. - SIEM streaming, $100 a month per event sink, billed on top. - Authorization users: 100,000 free; lockout leaves the policy meter. The mock team's month is now 20 connections of 1,000 users: $1,420. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fforootd
added a commit
that referenced
this pull request
Nov 1, 2026
…M streaming The pricing page follows the repriced list from #2558: - SSO and directory users each say what one connection or directory costs at most a month, and a question explains the cap. - B2B lists directory users beside SSO users. - Audit retention becomes Audit trail, with SIEM streaming per sink. - Amounts with cents keep two digits: $0.10, not $0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-catalog-mock Main serves the API under /api/v1 and routes only the server's own paths to it in the cloud (#2356 to #2359, #2566): - buildHTTPMux takes main's api.Servers and keeps this branch's cron triggers; a job no trigger runs leaves its path to the root alias. - vercel.json and the cloud runbook route /cron/usage to the server, as /cron/events-retention, or the usage cron would reach the website. - The functions' and the console's usage specs answer under /api/v1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fforootd
added a commit
that referenced
this pull request
Nov 1, 2026
#2558 now holds main, whose cloud routes every path no other service claims to the website (#2566). The page's own rewrite for /pricing goes with the explicit list, the website's AGENTS.md takes main's routing rule, and the deployment check opens /pricing beside main's 404 probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the cloud launcher's renderConfig: main renders the config as a YAML map, and the branch adds usage.trigger_secret beside the purge's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's console layout (Console ADR 0007) deletes DESIGN_ONLY_NAV and moves resource code into feature folders, so the usage helpers move from lib/usage.ts to features/usage/ (model.ts, and api.ts for the read). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main took ADR 086 for invitations, so the usage-rollups ADR moves to 087. The index keeps main's 086 row and lists this branch's as 087, and every mention of the usage ADR, generated code included, now says 087. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fforootd
added a commit
that referenced
this pull request
Nov 6, 2026
Picks up main through #2558's branch, and with it the usage-rollups ADR's new number, 087 (main took 086 for invitations). The two conflicts were comments and the bundled OpenAPI file, which the regeneration confirms. The catalog's bot-check meter pointed at "ADR 086" for #2835's abuse protection ADR, which that PR now numbers 087, the same as the usage ADR here. The source note names that ADR by its title and PR instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
routes.spec.ts keeps both new imports: main's Team type and this branch's entitlementsFor. Main made Team.joined_at required (#2870), so the usageByDay test's team fixture gets one; the usage read ignores it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Billing keeps the branch's load of billing and usage and takes main's rename of the add-on nav view to "account" (#2906). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Billing keeps the branch's load of billing and usage and takes main's nav view, "settings" again (#2909). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main's Logs screen took nav order 9, which Usage had: Logs keeps 9, Usage moves to 10 and project Settings to 11. Main's fold_user_unique_attributes migrations took the usage migrations' numbers, so usage moves to Postgres 000042, Spanner 000046 and SQLite 000029. The service mock is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's event_test.go declares eventIDs, the same helper usage_test.go declared, so stmttest stopped compiling under the integration tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's Search ADR took 087, so the usage ADR becomes 088 with every reference the branch wrote; the Search ADR's keep 087. Main's user_attributes_search_text migrations took the usage migrations' numbers, so usage moves to Postgres 000043, Spanner 000047 and SQLite 000030. The ogen code is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's request flush wait and idle timeout for the cloud's launcher (#2952) meet the branch's usage count: the export adapter counts usage and the request buffer takes the flush wait, buildHTTPMux keeps the cron triggers beside main's idleTimeout, the launcher's comment names both, and the two config tests stay apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main took 088 for abuse protection per operation (#2835). Renames the file, its README row and every citation on this branch; the generated OpenAPI and Go client comments change with their source descriptions.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The server counts each project's monthly active users and the console shows usage by day or cumulatively. MAU remains an analytics metric: it never creates a bill or forces a plan upgrade.
usage_first_seen,usage_hoursandusage_cursorsacross Postgres, Spanner and SQLite. The projector reads settled events and advances counts and its cursor in one transaction; the purge retains events the projector has not counted yet. ADR 086 describes the design.sealed_throughandteam_id, including before a project is claimed. Self-hosted installations show counts; the hosted add-on can also show estimated costs.bot_checksmeter and the future per-check item are removed.unit(user, check, email, message, token), and labels drop jargon: enterprise SSO users, directory-synced users (SCIM), authorization API checks, service access tokens, managed email and SMS delivery, extra API requests, uptime SLAs, technical account manager hours, and support response times in hours and minutes.bill()prices the blocks of extra requests a month needs and estimates Pro for a month past Free's request ceiling. The example with 20 connections of 1,000 SSO users is $1,500: $100 base plus $1,400 after caps and the allowance. Billing hides the credit bar for Free and Pro. Usage reporting filters out MAU, API-request gauges and removed/unpriced meters.apps/cloud-functions/src/pricing/catalog.jsonis the pricing source for both the estimator and #2562's website, and itsdecidedlist names the keys the owner has settled. ADR 084 documents the commercial model.Validation
For the pricing changes:
moon run cloud-functions:test cloud-functions:lint cloud-functions:typecheck cloud-console:test website:test website:lint website:typecheck website:build: 116 functions, 21 cloud-console and 46 website tests passed; lint, builds and type checks passed.catalog.schema.jsonwith Ajv 2020.node scripts/check-changesets-status.mjs --pendingandnode scripts/check-pr-title.mjs --title "feat: show project usage and keep core cloud identity free"passed.The unchanged usage implementation previously passed Go unit, SQLite and Postgres checks and console tests. Those integration lanes were not rerun for this pricing update. The Spanner lane and deployed end-to-end checks remain outstanding.
Release notes / changeset
.changeset/usage-counted-and-served.md(@zitadel/server: minor) describes project usage counting and the Usage screen. The cloud's prices are not part of@zitadel/server, so they stay out of its release notes.Notes
report-usage, a lag metric and a CLI usage command remain deferred in ADR 086. Stripe reporting still reads the mock feed.🤖 Generated with Claude Code