Add redis hll user event tracking for resource link clicks on frontend
What does this MR do and why?
This MR implements frontend tracking for Linked resources
feature.
Relates to #368597 (closed)
Screenshots or screen recordings
NA
How to set up and validate locally
- Make sure you have GitLab Premium
- Enable feature flag
incident_resource_links_widget
on rails console using `Feature.enable(:incident_resource_links_widget) - Open a project where you have atleast reporter permissions.
- Open or create an incident in Monitor > Incidents
- Check the
Linked resources
widget in theSummary
tab. - Run
Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'incident_management_issuable_resource_link_visited', start_date: Date.current.beginning_of_week, end_date: Date.current.next_week)
in the rails console. - Check that the value is
0
. - Add a resource link from the UI on
Linked resources
section. - Click on that link. (It's fine if the link does not lead anywhere).
- Run the command from
step 6
again in the rails console. - See the value getting incremented from
0
to1
.
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 #368597 (closed)
Edited by Rajendra Kadam