Commit 51ca20d9 authored by alinamihaila's avatar alinamihaila

Migrate collected_data_categories metric

parent a3bf2c99
......@@ -13,6 +13,7 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65336
time_frame: none
data_source: system
data_category: Standard
instrumentation_class: CollectedDataCategoriesMetric
distribution:
- ce
- ee
......
......@@ -5,6 +5,5 @@ remove_date: '2021-10-09'
This file was moved to [another location](../service_ping/metrics_instrumentation.md).
<<<<<<< HEAD
<!-- This redirect file can be deleted after <2021-10-09>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->
......@@ -5,7 +5,7 @@ module Gitlab
module Metrics
module Instrumentations
class CollectedDataCategoriesMetric < GenericMetric
def value
value do
::ServicePing::PermitDataCategoriesService.new.execute
end
end
......
......@@ -257,7 +257,7 @@ module Gitlab
ldap_encrypted_secrets_enabled: alt_usage_data(fallback: nil) { Gitlab::Auth::Ldap::Config.encrypted_secrets.active? },
operating_system: alt_usage_data(fallback: nil) { operating_system },
gitaly_apdex: alt_usage_data { gitaly_apdex },
collected_data_categories: alt_usage_data(fallback: []) { Gitlab::Usage::Metrics::Instrumentations::CollectedDataCategoriesMetric.new(time_frame: 'none').value }
collected_data_categories: add_metric(Gitlab::Usage::Metrics::Instrumentations::CollectedDataCategoriesMetric.new(time_frame: 'none'))
}
}
end
......
......@@ -42,6 +42,10 @@ RSpec.describe Gitlab::UsageDataMetrics do
it 'includes usage_activity_by_stage_monthly keys' do
expect(subject[:usage_activity_by_stage_monthly][:plan]).to include(:issues)
end
it 'includes settings keys' do
expect(subject[:settings]).to include(:collected_data_categories)
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment