Skip to content

Remove usage of `known_events.yml` files

Background

With all metrics having corresponding YAML definitions files that include options.events information from known_events/ is being duplicated

Goal

Remove duplicated information and provide SSOT in form of metric YAML definitions

Implementation tips

  1. Unless it is not resolved before this issue (see: #280527 (closed)) consider how to migrate other attributes from known_events definitions like: category, redis_slot, aggregation to metric YAML definition
  2. Change implementation of HllRedisCounter#known_events to load data from metrics yaml definition files options.events (eg: https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210216174846_p_analytics_pipelines.yml#L16)
  3. Remove known_events/ rake task from https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/tasks/gitlab/usage_data.rake#L37
  4. Remove known_events/ directories for CE and EE editions
  5. Remember to adjust test coverage accordingly
  6. Remember to update documentation https://docs.gitlab.com/ee/development/service_ping/implement.html#redis-hll-counters https://docs.gitlab.com/ee/development/service_ping/implement.html#redis-sourced-aggregated-metrics
Edited by Mikołaj Wawrzyniak