Skip to content

Migrate subscription metrics to use instrumentation classes

What does this MR do and why?

Migrate Subscription metrics to use instrumentation classes.

We want to use Instrumentation based classes for all subscription metrics to unify the way metrics being used in Service Ping and usage data

How to set up and validate locally

Since its a refactoring, the existing functionality is covered by an unit test https://gitlab.com/gitlab-org/gitlab/blob/f272c7dd5ea10394c4d2dd2f90a249dd35964632/ee/spec/lib/ee/gitlab/usage_data_spec.rb

To test manually:

  1. Gitlab::UsageDataNonSqlMetrics.uncached_data[--metric name--] for usage data
  2. ServicePing::SubmitService.new.execute then check at RawUsageData.last.payload[--metric name--] for service ping

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #338461 (closed)

Edited by Niko Belokolodov

Merge request reports