Allow absolute values in Weighted Sum Aggregation
complete
M
Markand
Currently Weighted sum aggregation doesn't support sending absolute values. For example, if we are measuring storage like S3, and at any instance user uploads 5 GB of data, we send unit property as 5, now when user deletes some data(say 1 GB) we need to send -1(relative to previously sent reading) instead of 4.
Generally in large systems not every byte of upload and delete is measured, rather total storage at the end of the day is measured. So what happens is we need to store what reading we submitted in last event. So when we get a current storage size of user, we need to calculate the difference from previous reading and then send that difference in the event which can lead to inconsistencies and involves storing previous readings for all customers. Hence it will be very helpful if we can send usage meter property in absolute value.
Basically I am requesting recurring time weighted LATEST aggregate!
Lago admin
complete
You can now use our feature SQL CUSTOM EXPRESSIONS, available for all our users:
For your usage-based metrics, define SQL expressions to aggregate usage, such as rounding, concatenation or math operations.
Docs: https://getlago.com/docs/guide/billable-metrics/sql-expressions
Lago admin
in progress
Lago admin
planned
This will be achievable through a feature called
custom SQL expressions
Ayush Chothe
Yes, this should be implemented as we don't always have the last value sent to Lago.