Migrate security_products_usage metrics to instrumentation classes
What does this MR do and why?
This MR completes migration of security_products_usage
service ping metrics family to instrumentation class framework
Most of the metrics included in #security_products_usage
was already configured to use instrumentation classes see https://gitlab.com/search?group_id=9970&project_id=278964&scope=blobs&search=instrumentation_class%3A+CountCiBuildsMetric and https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210204124854_license_management_jobs.yml
Resolves #339446 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
In rails console
payload = ServicePing::BuildPayload.new.execute
names = Gitlab::UsageData::SECURE_PRODUCT_TYPES.except(:license_management, :license_scanning).map do |(_, attribs)|
attribs[:name]
end
names << :license_management_jobs
payload[:counts].slice(*names)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.