Skip to content

Migrate web_ide_commits and web_ide_merge_requests to internal events

Ankit Panchal requested to merge 448286-migrate_web_ide_commit-merge_events into master

What does this MR do and why?

This migrates the counts.web_ide_commits and counts.web_ide_merge_requests total count metric to Internal Events, while keeping the original Redis key. Instead of migrating the key to the new format in TotalCountMetric, the new key is aliased in a YAML file and points to the old one, so that the count continues in the old key and we can keep the past count.

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.

  1. Checkout master and fire the event a few times.
  2. Run in console and note the value:
definition = Gitlab::Usage::MetricDefinition.definitions['counts.web_ide_commit_created']
Gitlab::Usage::Metric.new(definition).with_value
definition = Gitlab::Usage::MetricDefinition.definitions['counts.web_ide_merge_request_created']
Gitlab::Usage::Metric.new(definition).with_value
  1. Checkout MR branch and run the code in the console again. The value should be identical.
  2. Fire the event a few more times and check if the value got incremented.

Related to #448286

Merge request reports