Rounding options
Setrounding_function to choose how Lago rounds the quantity:
ceil: rounds up.floor: rounds down.round: rounds to the nearest value.
rounding_precision to set the number of decimal places.
Precision
These examples userounding_function: round.
Example: compute hours
A billable metric measures 10.2 hours of compute usage during a billing cycle. With no precision set, each rounding option gives the following result:Apply rounding
Once the metric is attached to a Plan, only its name, description and permitted filter changes can be updated. Set rounding before you attach the metric.- Dashboard
- API
On the configuration page of your billable metric, enable rounding, select
ceil, floor or round, and set an optional precision.Aggregation types
How the value is aggregated before rounding.
Rates
Price the rounded quantity.
Create a billable metric (API)
POST /billable_metricsUpdate a billable metric (API)
PUT /billable_metrics/{code}