Skip to content
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(event): Add view to allow caching of charge/filters for billable_metrics #2231

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

vincent-pochet
Copy link
Collaborator

Context

This PR is part of the real-time aggregation epic

Description

This PR adds a new billable_metrics_grouped_charges database view. It selects the charges for each organization/billable metric code/plan tupple. It will be used to route events received on the ingest service to the right bucket in order to perform a pre-computation and allow future "real time aggregation"

@vincent-pochet vincent-pochet force-pushed the feat-event-filter-view branch from 6daf851 to 5ddaf06 Compare July 4, 2024 08:48
@vincent-pochet vincent-pochet force-pushed the feat-event-filter-view branch from 5ddaf06 to 09d1d57 Compare July 4, 2024 08:52
@vincent-pochet vincent-pochet merged commit d90692e into main Jul 4, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the feat-event-filter-view branch July 4, 2024 09:14
ancorcruz pushed a commit that referenced this pull request Jul 7, 2024
…_metrics (#2231)

This PR is part of the real-time aggregation epic

This PR adds a new `billable_metrics_grouped_charges` database view. It
selects the charges for each organization/billable metric code/plan
tupple. It will be used to route events received on the ingest service
to the right bucket in order to perform a pre-computation and allow
future "real time aggregation"
vincent-pochet added a commit that referenced this pull request Jul 18, 2024
## Context

This PR update the `billable_metrics_grouped_charges` view introduced in
#2231 to allow a better
filtering of events related to in advance charges.

Today all event having the code of a billable metric related to an in
advance charge is sent to the event_worker even if no subscription is
attached to it leading to a lot of load on the worker for jobs that will
in the end not be charged

## Description

This PR will allow us to the update the ingest service so that only
event related to an in advance charge on a active subscription are sent
to the event worker
abdussamadbello pushed a commit to abdussamadbello/lago-api that referenced this pull request Aug 8, 2024
…#2300)

## Context

This PR update the `billable_metrics_grouped_charges` view introduced in
getlago#2231 to allow a better
filtering of events related to in advance charges.

Today all event having the code of a billable metric related to an in
advance charge is sent to the event_worker even if no subscription is
attached to it leading to a lot of load on the worker for jobs that will
in the end not be charged

## Description

This PR will allow us to the update the ingest service so that only
event related to an in advance charge on a active subscription are sent
to the event worker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants