Skip to content

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:

  1. 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:

  • total key with count(Foo) value
  • active_users with Foo.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)
}
  1. 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.

cc @jeremy @tayloramurphy @jameslopez @donaldcook

Edited by Eric Brinkman