Skip to content

Add metrics for Dependency Management actions

What does this MR do and why?

This MR is related to Govern SMAU Metric (#414757 - closed). The goal is to have metrics for individual actions, aggregate metrics for each of the 5 categories, aggregate metrics for 3 groups within Govern and then aggregated metrics for the entire stage.

In this MR specifically, we add metrics for actions related to groupthreat insights and Category:Dependency Management. The actions we want to track are:

  • Page visits where page_url REGEXP '.*/-/dependencies$'
  • Page visits where page_url REGEXP '.*/-/licenses$'

How to set up and validate locally

  1. Visit any of the above-mentioned pages
  2. Open rails c and check that a counter value is updated:
Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: '<event-name>', start_date: Date.current.beginning_of_week, end_date: Date.current.next_week)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #416915 (closed)

Merge request reports