Skip to main content
Meters are there to filter and aggregate the events that are ingested. Said another way, this is how you define what usage you want to charge for, based on the events you send to Solifyn. For example:
  • AI usage meter, which filters the events with the name ai_usage and sums the total_tokens field.
  • Video streaming meter, which filters the events with the name video_streamed and sums the duration field.
  • File upload meter, which filters the events with the name file_uploaded and sums the size field.
You can create and manage your meters from the dashboard. Solifyn is then able to compute the usage over time, both globally and per customer.

Creating a Meter

To create a meter, navigate to the Meters section under your Products tab in the dashboard and click Create Meter. Creating a meter in the light mode dashboard When defining a meter, you configure:
  • Name & Description: A clean display name and description.
  • Event Name: The exact string of the event to track (e.g. api.request).
  • Aggregation Strategy: How usage values should be computed over the billing period.
  • Aggregation Key: For properties, the key in metadata to target (e.g. tokens).
  • Unit Label: The suffix (e.g. requests, GB, tokens).

Aggregation Strategy

Solifyn supports four distinct aggregation strategies:
  • COUNT: Counts the total number of events received that match the event name. The event value is ignored. (Ideal for counting API calls or signups).
  • SUM: Sums the numeric value of all matched events. (Ideal for tracking total gigabytes transferred, hours streamed, or dollar amounts spent).
  • MAX: Keeps the highest value recorded among all matched events. (Ideal for peak resource usage billing).
  • LAST: Keeps the value from the most recent event. (Ideal for seat adjustments or storage space status).
Consider the following stream of events sent for a single customer:
[
  {
    "event_id": "evt_1",
    "customer_id": "cus_123",
    "event_name": "ai.tokens",
    "value": 10
  },
  {
    "event_id": "evt_2",
    "customer_id": "cus_123",
    "event_name": "ai.tokens",
    "value": 20
  },
  {
    "event_id": "evt_3",
    "customer_id": "cus_123",
    "event_name": "ai.tokens",
    "value": 30
  }
]
Here is the resulting aggregated usage calculated by Solifyn for each strategy:
  • COUNT: 3 (3 total events ingested)
  • SUM: 60 (10 + 20 + 30)
  • MAX: 30 (highest value)
  • LAST: 30 (most recent value)

Advanced Filters

Meters support advanced filters configured in JSON to match custom key-value pairs inside the event’s metadata. Configuring meter filters
  • Property: The exact metadata key.
  • Operator & Value: Match constraints such as region equals asia.

Managing Meters

Once created, you can track meter activities directly in the Dashboard:
  • View event history and chart views of usage over time.
  • Archive a meter if it is no longer needed.
  • Unarchive archived meters.