-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(flexible aggregation) - Support flexible aggregation on billable metric #2704
Open
nudded
wants to merge
6
commits into
main
Choose a base branch
from
feat-flexible-aggregation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nudded
force-pushed
the
feat-flexible-aggregation
branch
2 times, most recently
from
October 17, 2024 13:04
99fb1d4
to
3278914
Compare
nudded
changed the title
feat(flexible aggregation) - Support flexible aggregation on billable metric.
feat(flexible aggregation) - Support flexible aggregation on billable metric
Oct 17, 2024
nudded
force-pushed
the
feat-flexible-aggregation
branch
4 times, most recently
from
October 21, 2024 15:10
55e540f
to
9d36ae0
Compare
This was referenced Oct 24, 2024
vincent-pochet
force-pushed
the
feat-flexible-aggregation
branch
2 times, most recently
from
October 25, 2024 07:24
17439fe
to
8ff8b64
Compare
annvelents
approved these changes
Oct 28, 2024
nudded
force-pushed
the
feat-flexible-aggregation
branch
2 times, most recently
from
October 31, 2024 14:42
75bc326
to
8fffa66
Compare
nudded
force-pushed
the
feat-flexible-aggregation
branch
from
October 31, 2024 14:50
8fffa66
to
ab37eb0
Compare
nudded
force-pushed
the
feat-flexible-aggregation
branch
from
October 31, 2024 15:26
db88df3
to
82ceecf
Compare
nudded
force-pushed
the
feat-flexible-aggregation
branch
from
October 31, 2024 15:29
82ceecf
to
04efbe6
Compare
nudded
force-pushed
the
feat-flexible-aggregation
branch
from
October 31, 2024 16:05
fa3e982
to
7b95c8d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Billable metrics only allow you to aggregate on 1 property field. Several customers like to have some sort of computation done, so they can be flexible on how they send the event data to Lago.
Here is an example: a customer wants to send
started_at
,ended_at
&replicas
as the properties and calculate the value as(ended_at - started_at) * replicas / 3600
.To facilitate this, this PR introduces a new pre-ingestion step. This step runs in between receiving the event and persisting it to the db (both Clickhouse & Postgres event stores are supported).
This ingestion step relies on allowing customers to define an ‘Expression’ that will be evaluated for every event.
The expression parsing and evaluation relies on the new https://github.com/getlago/lago-expression library