Skip to content

Expand event schema to allow `internal_events`

Jonas Larsen requested to merge 435201-expand-schema into master

What does this MR do and why?

We want to remove the category property for events used in Internal Events as the category is no longer hardcoded to InternalEventTracking.

As part of removing the category property we need another way to identify which events are used by Internal Events. This is mostly to make sure the metric dictionary can render the events.

This MR adds the possibility that event definitions can have a property called internal_events. true is the only valid value so far.

This MR also adds the new property to a single event definition to verify the implementation.

The rest of the event definitions (~145 files) will be updated in a number of follow up MRs.

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.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Add the following line to config/events/20230807084242_InternalEventTracking_g_edit_by_snippet_ide.yml

    internal_events: true
  2. Run the validation spec and see it pass: bundle exec rspec spec/lib/gitlab/tracking/event_definition_validate_all_spec.rb

  3. Change the value to false

  4. Rerun the spec and see it fail

Related to #435201 (closed)

Edited by Jonas Larsen

Merge request reports