Add Google Artifact Registry count to Service Ping
requested to merge 441693-instrument-usage-stats-for-the-google-artifact-registry-integration into master
What does this MR do and why?
Add the new counter of the projects that have active Google Artifact Registry integration to Service Ping.
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.
How to set up and validate locally
Execute the following commands in the rails console:
-
Make sure that all required criteria for the integration are met
Feature.enable(:google_cloud_support_feature_flag) # to set the FF ::Gitlab::Saas.feature_available?(:google_cloud_support) # should return true. More about how to simulate the SaaS instance locally https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance
-
Verify the integration Google Artifact Registry
google_cloud_platform_artifact_registry
is listed among the available integrationsIntegration.available_integration_names(include_dev: false, include_disabled: true)
-
Verify that the metric returns
0
Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values, cached: false)['counts']['projects_google_cloud_platform_artifact_registry_active']
The counter should return
0
-
Create a new Google Artifact Registry integration
FactoryBot.create(:google_cloud_platform_artifact_registry_integration)
-
Verify that the metric is updated
Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values, cached: false)['counts']['projects_google_cloud_platform_artifact_registry_active']
The counter should return
1
Related to #441693 (closed)
Edited by Dzmitry (Dima) Meshcharakou