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: add api to get mau summaries #554
Conversation
masaaania
commented
Oct 17, 2023
•
edited
edited
- This PR
- adds an API to summarize MAU. 78f10e0
- adds a cronjob to execute that API. 6094e9d
proto/eventcounter/service.proto
Outdated
@@ -130,6 +131,15 @@ message GetMAUCountResponse { | |||
int64 user_count = 2; | |||
} | |||
|
|||
message GetMAUCountsRequest { | |||
string year_month = 1; | |||
bool isGroupingBySourceID = 2; |
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.
nit: is_grouping_by_source_id
environment_namespace as environment_id, | ||
source_id, | ||
count(*) as user_count, | ||
IFNULL(SUM(event_count), 0) as request_count |
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.
How about adding the evaluation and goal request count to the query?
c8e7855
to
7a86be3
Compare
@@ -786,6 +786,106 @@ func TestGetMAUCount(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestSummarizeMAUCounts(t *testing.T) { |
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.
Can you also add the tests for Unauthenticated
, PermissionDenied
, and Internal
while calling the checkAdminRole
?
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.
@cre8ivejp
Thanks, I added it 👍
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.
Thank you 🎉