feat(usage): push hourly usage snapshots to Control Plane#7831
feat(usage): push hourly usage snapshots to Control Plane#7831germangarces wants to merge 4 commits into
Conversation
Signed-off-by: germangarces <german.garces@flagsmith.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
846c01b to
904f6e3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7831 +/- ##
==========================================
+ Coverage 98.57% 98.59% +0.02%
==========================================
Files 1464 1473 +9
Lines 56625 57601 +976
==========================================
+ Hits 55818 56794 +976
Misses 807 807 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: germangarces <german.garces@flagsmith.com>
904f6e3 to
c7e5332
Compare
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
Signed-off-by: germangarces <german.garces@flagsmith.com>
Signed-off-by: germangarces <german.garces@flagsmith.com>
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #7673
refactor(app_analytics): extract bucket query and aggregation helpers
Pull the shared queryset build and per-resource aggregation out of
get_usage_data_from_local_dbso a windowed reader can reuse them. No behaviour change.feat(usage): push hourly usage snapshots to Control Plane
Recurring task reports each licensed organisation's data usage to the Control Plane once an hour, authenticated with the licence signature. No-op until
CONTROL_PLANE_URLis set and a licensed organisation exists.Reads API-call counts at hourly resolution via a new
app_analyticswindow selector; the daily billing path is left untouched.How did you test this code?
Tested end-to-end locally.
Quick check (No control plane needed):
make docker-up django-migrateLOG_LEVEL=DEBUG make django-shellYou should see something like: