Finish migrating devops report events to internal events
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
-
Set up snowplow micro & run the event monitor/open snowplow micro UI
- (I use colima to run docker for this)
- (snowplow micro at http://localhost:9092/micro/ui)
- Got to Admin Area > Analytics > DevOps Reports to trigger the events.
-
/admin/dev_ops_reports
to triggeri_analytics_dev_ops_adoption
-
/admin/dev_ops_reports?tab=devops-score
to triggeri_analytics_dev_ops_score
- Note: navigating around will also trigger FE internal events
-
Before | After |
---|---|
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