Add Service Ping instrumentation for Duo Code Review
Objective
Gather usage data for Duo Code Review using the established internal analytics framework.
Events and Metrics
Definition of events and metrics | Sample metrics | Sample events
Details of events to be tracked:
| Event Description | Event Name | Additional Properties | Feature |
|---|---|---|---|
| Duo Code Review performed a review | |||
| Duo Code Review posted a diff comment | |||
| User posted a thumbs up (any tone) on a Duo Code Review diff comment | |||
| User posted a thumbs down (any tone) on a Duo Code Review diff comment | |||
User mentioned @GitLabDuo in an MR comment |
|||
| <possibly more in order to support the metrics below> |
Details of metrics to be tracked:
| Metric Description | Event / DB column to base the Metric on | Total or Unique Count of a Property | Time Frame | Feature |
|---|---|---|---|---|
| Count of Duo Code Review reviews requested | last 7 days, last 28 days | |||
| Count of MRs reviewed by Duo Code Review | last 7 days, last 28 days | |||
Count of MRs with DCR interactions (i.e. mentioning @GitLabDuo on MR comment) |
last 7 days, last 28 days | |||
| Count of thumbs up on Duo Code Review review comments (only the 1st comment in a diff thread, not interaction comments) | last 7 days, last 28 days | |||
| Count of thumbs down on Duo Code Review review comments | last 7 days, last 28 days | |||
Count of unique users requesting a review from @GitLabDuo
|
last 7 days, last 28 days | |||
Count of unique users interacting with @GitLabDuo (i.e. mentioning @GitLabDuo in MR comments) |
last 7 days, last 28 days | |||
Count of unique authors with MRs reviewed by @GitLabDuo
|
last 7 days, last 28 days | |||
| Count of review comments posted by DCR (only the 1st comment in a diff thread, not interaction comments) | last 7 days, last 28 days |
Expand to view examples and guidelines for filling the table
Events:
- Description: Include what the event is supposed to track, where and when.
-
Name: Primary identifier of the event, format: <action>_<target_of_action>_<where/when>
- Example event name: click_save_button_in_issue_description_within_15s_of_page_load (action = click ; target = save button; where = in issue description ; when = within 15s
- **Additional properties: Besides user/project/namespace, what other details should be tracked, if any? ex) status, type, object id, etc.
- Feature: What feature is being instrumented? Please use the feature title that is used in features.yml if thats already available.
Metrics:
- Description: What quantitative measurements derived from either event data or database columns would you like to track? eg: Weekly count of unique users who update an issue
- Event/DB column: What event or database column should the metric count or be based on.
-
Total or unique count: Should the metric count all occurrences or only unique counts, e.g. of
user_idto get a count of unique users triggering an event. - Time Frame: What time frames should be tracked. Default and recommended is 7d and 28d.
Next steps
-
Assign an engineering counterpart from your group to add instrumentation to the code -
Explore instrumented data with the help of our data discovery guide. You can also reach out to product data insights team for help with generating Tableau reports/dashboards. -
Your feedback is valuable to us. Please leave us feedback in the comment section of this issue and tag @tjayaramaraju.
Important links
Edited by François Rosé