Count unique users for more accurate SMAU reporting
SMAU data should report back the MAU users of each stage as per the new definitions here: gitlab-com/www-gitlab-com!23191 (diffs)
In usage_data.rb, include the number of unique users who created each of the counted metrics. Include an aggregate number totalling all unique creators on the instance.
Proposal
Add the following to our existing usage ping:
- Include the number of unique users who have created each of the counted metrics.
Possible solution: we can accomplish this by for each in system_usage_data's counts, I'd say have two things in the hash:
-
totalkey withcount(Foo)value -
active_userswithFoo.count('creator_id', :distinct => true).
As an example - for something like projects, today:
projects: count(Project)
After the change:
projects: {
total: count(Project),
creators: Project.count('creator_id', :distinct => true)
}
- Include an aggregate number totaling all unique creators on the instance.
Possible solution: in system_usage_data, add stage_active_user_count and look at distinct creators across all objects created in counts.
Edited by Eric Brinkman