Skip to content

Track Insights merge request chart item click events

What does this MR do and why?

As a follow-up to !142872 (merged) – which extends drill-down support to all charts whose query.data_source is issuables – this MR adds event/metric definitions for tracking click events on Insights "Merge Request" chart items using Internal Event Tracking.

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.

Screenshots or screen recordings

No visual changes.

How to set up and validate locally

  1. Make sure you have a GitLab Ultimate license
  2. Seed Insights data: NEW_PROJECT=1 bin/rake gitlab:seed:insights:issues
  3. Grab the ID for the new project returned in the terminal by the seeder above and seed Merge Request Analytics: FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 PROJECT_ID={YOUR_PROJECT_ID} bundle exec rake db:seed_fu
  4. Start the Internal Events monitor in the terminal (for more details, see the docs)
  5. Visit the Merge Requests Dashboard on the Insights page for your group/project: http://{LOCAL_INSTANCE}/groups/{GROUP_PATH}/-/insights/#/mergeRequests or http://{LOCAL_INSTANCE}/{GROUP_PATH}/{PROJECT_PATH}/insights/#/mergeRequests
  6. Click on any of their chart items and verify that each click event triggers the tracking events listed in the description above in the Internal Events monitor.

Internal Events Monitor

rails runner scripts/internal_events/monitor.rb insights_merge_request_chart_item_clicked

Related to #436704 (closed) and #439514 (closed)

Edited by Rudy Crespo

Merge request reports