{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Storage",
"code": "storage",
"description": "GB of storage used in my application",
"recurring": false,
"rounding_function": "round",
"rounding_precision": 2,
"created_at": "2022-09-14T16:35:31Z",
"expression": "round((event.properties.ended_at - event.properties.started_at) * event.properties.units)",
"field_name": "gb",
"aggregation_type": "sum_agg",
"weighted_interval": "seconds",
"filters": [
{
"key": "region",
"values": [
"us-east-1"
]
}
]
}Billable metrics
The billable metric object
This object represents a billable metric used to define how incoming events are aggregated in order to measure consumption.
Defines if the billable metric is persisted billing period over billing period.
- If set to
true: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to
false: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is
false.
Example:
false
Parameter exclusively utilized in conjunction with the weighted_sum_agg aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals.
Available options:
seconds, null Example:
"seconds"