Bolt has moved to boltapp.com. Stores still using bolt.com hosts must update now: see the migration guide.

Skip to content

Meters

How reported usage events become a billable quantity for the period.

View As MarkdownMCP

A meter turns a stream of usage events into a billable quantity. It watches one event type and aggregates its events into a running total per billing period; at period end, the plan's charge model prices that total.

What a meter defines

  • Aggregation: sum adds up the events' quantities; count counts the events and ignores their quantities.
  • Filter (optional): property values the events must equal, for example only events where method equals POST. When a filter names several properties, an event must match all of them. There is no "one of" match, so to meter several values, use one meter per value. One event stream can feed several meters with different filters.
  • Reusable: a meter is defined once and can serve many plans.

Event types Bolt supports today

Every event names an event_type from a Bolt-managed registry, which also validates the event's optional properties:

event_typeKindProperties
api_callsCountermethod (HTTP method), route
tokens_usedCountermodel
storage_gb_deltaGauge, signed deltasnone

Counters accumulate consumption and reject negative quantities. storage_gb_delta is a gauge: each event is a signed change to a storage level, so negative quantities are valid. Properties are optional; a meter with no filter bills the event regardless of them.

The registry is managed by Bolt and an event type's schema never changes once shipped. If your usage does not fit an existing event type, contact Bolt.

Example

To bill write requests separately from reads, define two meters on the same api_calls stream:

  • Write calls: one meter per method, each sum over api_calls with filter method equals POST, PUT, PATCH, or DELETE.
  • Read calls: sum over api_calls, filter method equals GET.

Attach each meter to a plan with its own charge model, and one event feed prices the two kinds of traffic differently.

On this page