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(daily_usage): Add DailyUsage model #2718

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

vincent-pochet
Copy link
Collaborator

Context

This PR is part of the Usage Revenue and unit.

Today, Lago does not offer a way to retrieve customer usage with a granularity lower than the billing period (via invoices and fees). On the other end, it is possible to get the current usage for a customer/subscription, but this usage is just a “snapshot” of the usage a the current time.

Description

This PR is the first part of a feature implementing a daily usage monitoring. Is simply introduce a new DailyUsage model to store the computed daily usage.

Copy link
Contributor

@annvelents annvelents left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@vincent-pochet vincent-pochet merged commit cddf156 into main Oct 22, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the feat-daily-usage branch October 22, 2024 08:49
vincent-pochet added a commit that referenced this pull request Oct 29, 2024
## Context

This PR is part of the Usage Revenue and unit. It follows
#2718

Today, Lago does not offer a way to retrieve customer usage with a
granularity lower than the billing period (via invoices and fees). On
the other end, it is possible to get the current usage for a
customer/subscription, but this usage is just a “snapshot” of the usage
a the current time.

## Description

This PR adds the base logic to compute the daily usage for every active
subscription.

For now the feature is enabled by checking the presence of the
`LAGO_ENABLE_REVENUE_ANALYTICS` environment variable.
vincent-pochet added a commit that referenced this pull request Nov 4, 2024
## Description

This PR fixes a flacky test that was introduced by the recent
daily_usage feature

See #2718
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