Sending Usage Data
Designing Meters
2min
A measurement, as described in the previous section can be anything that you can to measure in your system. A meter is the exact definition of what you want to measure. It sets the expectations of the measurements including what the values represent and what metadata is required. It is important to maintain clear definitions and expectations of our measurements so that they are well understood and can be used accurately in analysis and price plans. Meters do not only have to measure things that you plan on billing for immediately, which makes them ideal for experimenting with new pricing models.
A meter is defined by the following attributes:
- Data Type: Determines what type of data your are sending us. This can be one of: Discrete or Continuous.
- Reporting Type: Determines how you are reporting the data to us. This can be one of: Delta or Total.
- Aggregation: Determines what aggregation function you want to apply at the end of the each billing cycle. This can be one of: Sum, Max, Latest, Time Weighted Sum, Count, Unique Count.
- Event Mapping (optional): Determines which event name maps to this meter. A single event can map to multiple meters allowing you to send a single value but trigger multiple meters within Octane.
- Metadata Labels (optional): Determines what how to attach metadata and how this metadata will create independent streams.
Each section below describes the attributes listed above in detail.
๏ปฟ