-
Notifications
You must be signed in to change notification settings - Fork 0
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(cloudquery-usage): Track CloudQuery plugin usage #1394
Conversation
bd1757b
to
444a02e
Compare
444a02e
to
49af7cb
Compare
@@ -57,3 +57,5 @@ ENABLE_MESSAGING=false | |||
INTERACTIVES_COUNT=3 | |||
|
|||
STACK=deploy | |||
|
|||
CQ_API_KEY_PATH=/CODE/deploy/service-catalogue/cloudquery-api-key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally, use the API key for CODE.
@@ -1,3 +1,3 @@ | |||
# Please do not edit this file manually | |||
# It should be added in your version-control system (i.e. Git) | |||
# It should be added in your version-control system (e.g., Git) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is generated by Prisma. This must be the first time creating a migration since #1389.
Creates a new service that writes to a new database table `cloudquery_plugin_usage` tracking the number of paid rows are synced per plugin, per day.
49af7cb
to
bed5ea1
Compare
I've just ran a backfill of PROD from 01 Jan 2024 to now (26 Jan 2025). |
What does this change and why?
Creates a new AWS Lambda that tracks plugin usage per day by calling the GetTeamUsageSummary endpoint and storing the results in a new database table
cloudquery_plugin_usage
.By default, yesterday's data is collected. This can be overridden by setting the
START_DATE
andEND_DATE
environment variables, enabling us to backfill data.The contents of this table will look something like this:
This allows us to monitor our daily usage to ensure we do not breach our contract.
Unfortunately, the API does not return the version of the plugin used. This would be helpful as, when looking through the data, we can see a big spike from 04 July 2024, which can be attributed to #1153.
How has it been verified?
I've deployed to CODE and ran the lambda to backfill data from 01 Jan 2024 to now.