Commit 966bb051 authored by Sean McGivern's avatar Sean McGivern

Merge branch '337513-move-feature-flag-metrics-to-ce' into 'master'

Move feature flag service ping metric to CE

See merge request gitlab-org/gitlab!67666
parents 36a27777 51a70d9f
......@@ -194,7 +194,6 @@ module EE
dependency_list_usages_total: redis_usage_data { ::Gitlab::UsageCounters::DependencyList.usage_totals[:total] },
epics: count(::Epic),
epic_issues: count(::EpicIssue),
feature_flags: count(Operations::FeatureFlag),
geo_nodes: count(::GeoNode),
geo_event_log_max_id: alt_usage_data { maximum_id(Geo::EventLog) || 0 },
ldap_group_links: count(::LdapGroupLink),
......
......@@ -39,8 +39,6 @@ RSpec.describe Gitlab::UsageData do
create(:jira_integration, project: projects[0], issues_enabled: true, project_key: 'GL')
create(:operations_feature_flag, project: projects[0])
create(:issue, project: projects[1])
create(:issue, health_status: :on_track, project: projects[1])
create(:issue, health_status: :at_risk, project: projects[1])
......@@ -97,7 +95,6 @@ RSpec.describe Gitlab::UsageData do
epics
epics_deepest_relationship_level
epic_issues
feature_flags
geo_nodes
geo_event_log_max_id
issues_with_health_status
......@@ -124,7 +121,6 @@ RSpec.describe Gitlab::UsageData do
network_policy_drops
))
expect(count_data[:feature_flags]).to eq(1)
expect(count_data[:status_page_projects]).to eq(1)
expect(count_data[:status_page_issues]).to eq(1)
expect(count_data[:issues_with_health_status]).to eq(2)
......
......@@ -108,6 +108,7 @@ module Gitlab
deployments: deployment_count(Deployment),
successful_deployments: deployment_count(Deployment.success),
failed_deployments: deployment_count(Deployment.failed),
feature_flags: count(Operations::FeatureFlag),
# rubocop: enable UsageData/LargeTable:
environments: count(::Environment),
clusters: count(::Clusters::Cluster),
......
......@@ -123,6 +123,8 @@ FactoryBot.define do
create_list(:project_snippet, 2, project: projects[0], created_at: n.days.ago)
create(:personal_snippet, created_at: n.days.ago)
end
create(:operations_feature_flag, project: projects[0])
end
end
end
......@@ -622,6 +622,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(count_data[:deployments]).to eq(4)
expect(count_data[:successful_deployments]).to eq(2)
expect(count_data[:failed_deployments]).to eq(2)
expect(count_data[:feature_flags]).to eq(1)
expect(count_data[:snippets]).to eq(6)
expect(count_data[:personal_snippets]).to eq(2)
expect(count_data[:project_snippets]).to eq(4)
......
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