Unknown event i_code_review_merge_request_widget_test_report_view
Gitlab::UsageDataCounters::HLLRedisCounter::UnknownEvent
Unknown event i_code_review_merge_request_widget_test_report_view
This is the most frequent error on Sentry (https://new-sentry.gitlab.net/organizations/gitlab/issues/334710/events/46ecd039d4b44a1cb6c96d1e94f40dab/?environment=gprd&project=3&query=is%3Aunresolved&referrer=previous-event&sort=freq&statsPeriod=14d&stream_index=0) with 1.6 million events.
See also Kibana: https://log.gprd.gitlab.net/app/r/s/CjgGp
Problem
See: #427061 (comment 1597806693)
The change that caused this was this line.
The widget telemetry docs note that the widget name is used to compute all of the events, and this widget name has changed.
Solution plan
See: #427061 (comment 1597806693)
All of the metrics (18 files) added in the original MR will need to be updated so that:
- the file name is
test_report
instead oftest_summary
- the key path is
test_report
instead oftest_summary
- the event name is
test_report
instead oftest_summary
Notably, I think some of those files have been obsoleted since that MR merged, so there may be fewer and/or they may have moved.
Additionally, the four files listed in Step 9 all have references to the test_summary
event, which should be updated to test_report
Please note that the rough workflow for this solution is this:
- Deprecate/remove the existing metrics (#427061 (comment 1599255000))
- Re-add all of the metrics using the new names for the metrics, their key paths, and any events (replacing
test_summary
withtest_report
).- Note that this will require going through the docs for adding telemetry to new widgets, as the automatic generator will create new file names (which also need that same replacement).
Alternatively:
We can also only rename the events within the metrics, but this introduces the same naming mismatch, just deeper in our architecture. The "proper" path forward is the steps above (mark as removed, then re-add with the correct names).