Skip to content

Fix license_id metric

Alina Mihaila requested to merge am-fix-license-id-metric into master

What does this MR do and why?

Describe in detail what your merge request does and why.

With this MR we fix the lincence_id instrumentation configuration

  • We should use ::License.current.license_id method
  • The license_id should be allowed in LicenseMetric instrumentation class
  • Use LicenseMetric metric in usaga_data.rb

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

Make sure you have a license for the environment where this is tested

# When using usgae_data.rb

Gitlab::UsageData.license_usage_data[:license_id]

# When using  instrumentation classes only

Gitlab::UsageDataMetrics.uncached_data[:license_id] 

Both values should equal License.current.license_id

MR acceptance checklist

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

Edited by Alina Mihaila

Merge request reports

Loading