Skip to content

Finish migrating devops report events to internal events

Sarah Yasonik requested to merge 439982-sy-finish-analytics-devops-score into master

What does this MR do and why?

Usage data for the DevOps Reports are generated using these internal events:

  • i_analytics_dev_ops_score
  • i_analytics_dev_ops_adoption

However, they were incompletely migrated to use the Internal Events framework. This MR ensures that these events are tracked using the correct methodology.

Note: as a result of the migration, the action & property fields will be flipped in the snowplow events going forward.

How to set up and validate locally

  1. Set up snowplow micro & run the event monitor/open snowplow micro UI
  2. Got to Admin Area > Analytics > DevOps Reports to trigger the events.
    • /admin/dev_ops_reports to trigger i_analytics_dev_ops_adoption
    • /admin/dev_ops_reports?tab=devops-score to trigger i_analytics_dev_ops_score
    • Note: navigating around will also trigger FE internal events
Before After
Screenshot_2024-03-25_at_3.26.39_PM Screenshot_2024-03-25_at_2.51.10_PM
Screenshot_2024-03-25_at_3.26.00_PM Screenshot_2024-03-25_at_2.50.32_PM

Verifying results in monitor

Monitored events: i_analytics_dev_ops_score, i_analytics_dev_ops_adoption

+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                     RELEVANT METRICS                                                                                     |
+------------------------------------------------------------------------+---------------------------------------------------------+-----------------------+---------------+---------------+
| Key Path                                                               | Monitored Events                                        | Instrumentation Class | Initial Value | Current Value |
+------------------------------------------------------------------------+---------------------------------------------------------+-----------------------+---------------+---------------+
| analytics_unique_visits.analytics_unique_visits_for_any_target         | i_analytics_dev_ops_adoption, i_analytics_dev_ops_score | AggregatedMetric      | 0             | 1             |
| analytics_unique_visits.analytics_unique_visits_for_any_target_monthly | i_analytics_dev_ops_adoption, i_analytics_dev_ops_score | AggregatedMetric      | 0             | 1             |
| analytics_unique_visits.i_analytics_dev_ops_adoption                   | i_analytics_dev_ops_adoption                            | RedisHLLMetric        | 0             | 1             |
| analytics_unique_visits.i_analytics_dev_ops_score                      | i_analytics_dev_ops_score                               | RedisHLLMetric        | 0             | 1             |
| redis_hll_counters.analytics.analytics_total_unique_counts_monthly     | i_analytics_dev_ops_adoption, i_analytics_dev_ops_score | AggregatedMetric      | 0             | 1             |
| redis_hll_counters.analytics.analytics_total_unique_counts_weekly      | i_analytics_dev_ops_adoption, i_analytics_dev_ops_score | AggregatedMetric      | 0             | 1             |
| redis_hll_counters.analytics.i_analytics_dev_ops_adoption_monthly      | i_analytics_dev_ops_adoption                            | RedisHLLMetric        | 0             | 1             |
| redis_hll_counters.analytics.i_analytics_dev_ops_adoption_weekly       | i_analytics_dev_ops_adoption                            | RedisHLLMetric        | 0             | 1             |
| redis_hll_counters.analytics.i_analytics_dev_ops_score_monthly         | i_analytics_dev_ops_score                               | RedisHLLMetric        | 0             | 1             |
| redis_hll_counters.analytics.i_analytics_dev_ops_score_weekly          | i_analytics_dev_ops_score                               | RedisHLLMetric        | 0             | 1             |
+------------------------------------------------------------------------+---------------------------------------------------------+-----------------------+---------------+---------------+
+--------------------------------------------------------------------------------------------------------------------------------------+
|                                                           SNOWPLOW EVENTS                                                            |
+------------------------------+--------------------------+-------------------------------+---------+--------------+------------+------+
| Event Name                   | Collector Timestamp      | Category                      | user_id | namespace_id | project_id | plan |
+------------------------------+--------------------------+-------------------------------+---------+--------------+------------+------+
| i_analytics_dev_ops_score    | 2024-03-25T19:31:29.357Z | Admin::DevOpsReportController | 1       |              |            |      |
| i_analytics_dev_ops_adoption | 2024-03-25T19:31:13.175Z | Admin::DevOpsReportController | 1       |              |            |      |
| i_analytics_dev_ops_adoption | 2024-03-25T19:31:12.245Z | Admin::DevOpsReportController | 1       |              |            |      |
+------------------------------+--------------------------+-------------------------------+---------+--------------+------------+------+

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #439982 (closed)

Edited by Sarah Yasonik

Merge request reports