← GlossaryMetering

Metering

The practice of measuring product usage in real time so it can be priced and billed accurately.

Metering is the foundation every other piece of usage-based billing sits on top of. Pricing, entitlements and invoicing are all just different views of the same metered data — reprice a plan and it's still metering underneath; check whether a customer can do something right now and that check reads the same metered totals that drive their invoice.

The hard part isn't counting events, it's counting them correctly under real conditions. A network retry can deliver the same event twice; events can arrive late or out of order; volume that looks fine in a demo can spike unpredictably in production. A metering system built only for the happy path isn't one you can safely bill real customers on.

That's why production metering systems need three things: a way to recognize a duplicate delivery so a retry doesn't get billed twice (an idempotency key), a record that's never silently overwritten so history stays trustworthy (an append-only ledger), and a tolerance window for events that arrive after the fact rather than treating lateness as an error state.

See it in KribanaMetering

See it running in your billing.