Add Single instrumentation tracking for Contribution analytics
What does this MR do and why?
This change refactors how wiki page events are tracked in the GitLab application. Previously, there was a dedicated service class (WikiPages::EventCreateService) that handled creating events when users performed actions on wiki pages. The logic now changed to trigger events from one source - Single instrumentation layer with events being configured in the event definition alone.
The main improvements include:
- Eliminated duplicate code by consolidating event tracking into a single approach
- Made the event tracking more consistent across different parts of the application
- Simplified the code structure by removing an unnecessary intermediate service layer
The functionality remains the same from a user perspective - wiki actions are still tracked for analytics and usage monitoring. However, the underlying code is now cleaner, more maintainable, and follows current architectural patterns. The changes also include updates to configuration files and test cases to reflect the new structure.
Related to #510076
Verification
- run
rails runner scripts/internal_events/monitor.rb performed_wiki_action - Create a wiki page in any project
- Verify Wiki event was created
Event.last - Verify event is present in the monitor UI
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.