Open Spanner
Use Cases

Use Cases

Practical metering patterns you can build with Open Spanner.

Open Spanner is useful whenever your product needs a trusted record of usage: billing, limits, customer reporting, operations, audits, or internal analytics. The core pattern is the same across use cases:

  1. Define a meter for the thing being measured.
  2. Send usage events from trusted backend code.
  3. Add dimensions for the fields you need to filter, group, export, or explain.
  4. Query buckets, breakdowns, and events when you need totals or detail.

Common Patterns

In-Doc Examples

Each use-case guide includes the meter definition, usage payload, and the dimensions that matter for that scenario.

For backend services that continuously emit usage over gRPC, start with stream-native examples:

Stream use caseWhat it records
Device telemetryHigh-frequency device readings grouped by device, fleet, and region.
WebSocket sessionsSession duration or connection counts emitted as sessions open and close.
Queue consumer throughputMessage handling volume grouped by queue, outcome, and worker region.

On this page