Skip to main content
Each meter uses one aggregation type to collapse all usage events in a billing period into a single billable number.

SUM

Adds all event values together. When to use: Counting discrete actions — API calls, messages sent, tasks executed, tokens generated.
SDK tracking:

MAX

Takes the highest single value observed during the period. When to use: Peak capacity measurements — max concurrent connections, peak storage used at any point, highest queue depth.
SDK tracking:

UNIQUE_COUNT

Counts the number of distinct values of a specified property. When to use: Monthly active users, unique API consumers, distinct items processed, unique devices.
For UNIQUE_COUNT meters, the SDK endpoint reads user_id from the event metadata. Make sure to include it:

LAST

Takes the most recent event value received during the period. When to use: Snapshot-based billing — current storage GB, current number of active seats, current record count.
SDK tracking (send current state periodically):

Choosing the Right Aggregation