Skip to main content

Understanding Metronome

a diagram showing a pipeline of event ingestion, billable metric aggregation, pricing, and invoicing

Metronome is a real-time platform for usage-based billing. Data in Metronome flows through a four-step pipeline:

  1. Usage event ingestion is how your data gets into Metronome. A usage event is anything that happens in your product that could result in a charge. For example, every call to your API could be a usage event. An event could also be purely synthetic, such as a daily summary of how many bytes a user has stored on disk.
  2. Billable metric aggregation is how usage events turn into the metrics you use for billing. For example, you might define a billable metric called "total API calls," defined as the per-customer count of API call events, or "maximum data stored," defined as a maximum of the sizes recorded in a daily summary event.
  3. Pricing is how customer costs are calculated. In this step, Metronome uses the pricing you define to determine how much each customer should pay, based on the usage they've consumed.
  4. Invoicing occurs based on a customer's scheduled pricing plan. An invoice shows a customer's total spending, with details about the products they're paying for and the usage they've consumed.
Terminology note

Other billing systems might name the preceding steps "metering," "mediation," and "rating." If you're familiar with those terms, that's great! But we think our terminology is more descriptive and easier for a newcomer to understand.

Real-time data at scale

Metronome processes your usage events as they happen and updates your billable metrics continuously. This real-time data stream sets Metronome apart from other billing platforms. Through the Metronome API, you can fetch up-to-date usage and spending data to power your dashboards, analytics tools, and notifications.

As you get started with Metronome, keep this notion of a data stream in mind. If you're used to thinking in terms of relational databases, you might imagine Metronome as a giant data store that collects all your usage events and queries them later to produce invoices. That model might be okay for small data sets, but Metronome's stream-based design gives you real-time data at scale.

Picture Metronome instead as a man standing outside a theme park, counting people with a tally counter. He's observing a stream of people entering the park, and he's keeping track of how many people have entered. Perhaps he's also keeping a running total of how many buttons he's seen on people's shirts, and he keeps the height of the tallest person he's seen all day written on a piece of paper. Importantly, though, he's not remembering everything about every person who enters. If you asked him how many people were wearing hats or to tell you about the shortest person he'd seen, he would be unable to answer. (He could, of course, start counting those things going forward if you asked nicely.)

In Metronome terms, the people entering the park are the usage events, and "count of people," "sum of shirt buttons," and "maximum height" are billable metrics.

Next steps

Now that you understand the Metronome pipeline and core concepts, you're ready to get usage data into Metronome.