Open Spanner
Open-source metering for usage-based products.
Open Spanner records product usage and turns it into queryable buckets for billing, reporting, limits, and audits.
Define the signals your product cares about, send usage from your backend, and use the dashboard to manage meters, API keys, and usage views. REST and the official SDKs are available for services that need to write, query, or export usage.
Start Here
What is Open Spanner?
Understand the product model and where it fits in your stack.
Core service installation
Run Open Spanner with Docker, Docker Compose, or directly from source.
Production deployment
Run the API, workers, Postgres, and published container image with production defaults in mind.
Choosing an SDK
Pick the right client for a backend service or worker.
Your first query
Query daily usage buckets for one subject and meter.
Product Flow
Define meters
Model the signals your product tracks: requests, seats, storage, tokens, jobs, or anything else you meter.
Choose dimensions
Add stable metadata fields for filtering, grouping, and export.
Record usage
Send idempotent usage events from backend services and workers.
Query buckets
Turn raw usage events into windows for billing, reporting, limits, and exports.
Watch thresholds
Create alert rules for usage windows that cross important limits.
Explore use cases
See how API, AI, storage, seat, job, feature, and backfill metering fit real products.
Configure auth
Use dashboard sessions for people and API keys for services.