Add support for combining simple batch counts across many tables to determine a distinct list of users
📡 Telemetry Instrumentation
This will serve as the parent issue for the new tracking that needs to be implemented.
📖 Reference - What data can be tracked currently?
Event Type | Snowplow JS (Frontend) | Snowplow Ruby (Backend) | Usage Ping | Database Import | Log System |
---|---|---|---|---|---|
Database Counts | |||||
Pageview Events | |||||
UI Events | |||||
CRUD and API Events | |||||
Event Funnels | |||||
Postgres Data | |||||
Logs | |||||
External Services |
Documentation:
- Telemetry Direction Page
- Data for Product Managers
- North Star Metrics
- Telemetry Guide
- Usage Ping Guide
- Snowplow Guide
📖 What needs to be tracked?
-
Database Counts -
Pageview Events -
CRUD / API Events -
Postgres Data -
Not sure (Telemetry will review)
Description of what needs to be tracked:
add another counter type to track batch counts for features that eventually are aggregated into a distinct count of users across each type of feature.
For example:
users_who_created_issues = Issues.where(:created_at => Time.now - 28 days).pluck(:author_id) # array of users who did this action
users_who_commented_on_issues = Notes.where(:created_at => Time.now - 28 days, :noteable_type => "comment").pluck(:author_id) # array of users who did this action
users_who_closed_issues = Issues.where(:closed_at => Time.now - 28 days).pluck(:closed_by_id) # array of users who did this action
user_list = [users_who_created_issues + users_who_commented_on_issues + users_who_closed_issues].uniq! # combine array of users together then remove duplicates
user_list_count = user_list.count
You can also likely do this with Full Joins in SQL across three tables, group by user_id, then distinct counts on user_id.
My eventual goal would be to roll up feature level counts all that way up to a category AWAU as illustrated in this diagram and the corresponding issue.
This is also in alignment with our emerging goal of rolling up "active users" from the feature level all the way to the product (gitlab-com/www-gitlab-com!52389 (merged))
Next steps (if any)
-
Telemetry review complete (mark complete if not required) -
Child issues created
Edited by 🤖 GitLab Bot 🤖