Add metrics for Vulnerability 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:Vulnerability Management. The actions we want to track are:
- Page visits where page_url REGEXP '.*/-/security/vulnerability_report$'
- Page visits where page_url REGEXP '.*/-/security/dashboard$'
- Page visits where page_url REGEXP '.*/-/security/vulnerabilities$'
- Page visits where page_url REGEXP '.*/-/security/vulnerabilities/[0-9]+'
- Page visits where page_url REGEXP '.*/-/pipelines/[0-9]+/security$'
- Page visits where page_url REGEXP '.*/-/security/dashboard/settings$'
-
Page visits where page_url REGEXP '.*/-/security/configuration$' AND page_url_query REGEXP '.*tab=vulnerability-management.*'This will be covered in another MR targeting only frontend tracking -
Any user who expands the Security MR Widgetthis is already tracked withi_code_review_merge_request_widget_security_reports_expand
.
How to set up and validate locally
- Visit any of the above-mentioned pages
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #416915 (closed)
Edited by Martin Čavoj