Add metrics widget telemetry events
What does this MR do and why?
For #368875 (closed)
This MR defines events to be tracked using Redis counters and HLL for the metrics widget according to the instructions in the telemetry section of the widget extensions docs.
The metrics widget extends the base.vue component, which sets up telemetry when it is created that tracks a standard set of events for the widget.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
git checkout 368875-add-metrics-widget-telemetry-events- have a GitLab Premium license or higher
echo "Feature.enable(:refactor_mr_widgets_extensions)" | bundle exec rails console- find/clone a project that generates browser performance reports
- open a merge request in the project, ensure pipelines ran for its base and head commits, and navigate to the merge request page
- open the
Networktab in your browser's devtools - interact with the metrics widget and verify that requests are made to
increment_unique_usersandincrement_counterwhen you do so
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Miranda Fluharty