Data Types, Reporting Types And Aggregations
Octane provides two meter data types: discrete and continuous. The distinction between these is primarily in how they record values in relation to time:
- Events that represent usage at an instance in time (e.g., api requests, clicks, dollar transactions).
- Can apply aggregations including SUM and MAX to get total billable usage.
- Reported via DELTA reporting method (required)
- Events that represent usage that is ongoing (e.g., storage, active users, number of workspaces).
- The value of an event persists in time.
- Can apply aggregations such as TIME_WEIGHTED_SUM and MAX to get total billable usage.
- Reported via TOTAL reporting method (recommended)
Discrete meters are best fit for counting individual usage events. Discrete meters are typically used to count things like API requests, file uploads, or function invocations.

When defining a discrete meter, the reporting method must be DELTA. With DELTA reporting, you will report the relative change from the latest measurement values. The relative change can be positive or negative.

The end-of-cycle value (billable usage) for discrete meters can be calculated using the SUM aggregation (the result of summing the deltas), or the MAX aggregation (the maximum value recorded in the cycle)

Continuous meters are best fit for measuring ongoing usage. For example, number of active users. This type of meter is used to record measured values as they change over time within a billing period. This adds a time dimension to the meter, which is reflected in the unit used for the aggregate total of a billing period. Continuous meters are typically used to record things like the number of active users, the amount of storage provisioned, or the number of running jobs that a customer has, as measured over time. Configuring this type of meter allows Octane to take the burden off of the streaming source to maintain awareness of the time elapsed between measurements.

When defining a discrete meter, the TOTAL reporting method is recommended. With TOTAL reporting, the value that you report will represent the latest and live measurement value. The value will persist, so it will remain as the effective value until another measurement is recorded. The value of a gauge can increase or decrease as the measured value recorded by that gauge changes over time.

The end-of-cycle value (billable usage) for continuous meters can be calculated using the TIME_WEIGHTED_SUM aggregation (see example below), or the MAX aggregation (the maximum value recorded in the cycle)

Time-Weighted Sum Aggregation example
This example demonstrates how total usage is calculated by a gauge:
- The gauge records a value of
- Next, the gauge records a value of
- The total usage for that 2.5 hour period is thus

To put it another way, the total usage for that 2.5 hour period is: