Commit 26bfb606 authored by Max Woolf's avatar Max Woolf

Add total distinct count of compliance frameworks to usage ping

Adds a new key to the usage ping along with new metric
definition.
parent 876a10fd
...@@ -6346,7 +6346,7 @@ Tiers: `free`, `premium`, `ultimate` ...@@ -6346,7 +6346,7 @@ Tiers: `free`, `premium`, `ultimate`
### `database.pg_system_id` ### `database.pg_system_id`
Missing description TBD
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183248_pg_system_id.yml) [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183248_pg_system_id.yml)
...@@ -7680,7 +7680,7 @@ Tiers: `free`, `premium`, `ultimate` ...@@ -7680,7 +7680,7 @@ Tiers: `free`, `premium`, `ultimate`
Number of projects using 5 min production app CI template in last 7 days. Number of projects using 5 min production app CI template in last 7 days.
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216184515_p_ci_templates_5_min_production_app_weekly.yml) [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210216184515_p_ci_templates_5_min_production_app_weekly.yml)
Group: `group::5-min-app` Group: `group::5-min-app`
...@@ -15286,6 +15286,18 @@ Status: `data_available` ...@@ -15286,6 +15286,18 @@ Status: `data_available`
Tiers: `free` Tiers: `free`
### `usage_activity_by_stage.manage.custom_compliance_frameworks`
Total count of all custom compliance framework labels
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210430081610_custom_compliance_frameworks.yml)
Group: `compliance`
Status: `implemented`
Tiers: `premium`, `ultimate`
### `usage_activity_by_stage.manage.events` ### `usage_activity_by_stage.manage.events`
Missing description Missing description
...@@ -15926,6 +15938,8 @@ Tiers: `free` ...@@ -15926,6 +15938,8 @@ Tiers: `free`
Histogram (buckets 1 to 100) of projects with at least 1 enabled integration. Histogram (buckets 1 to 100) of projects with at least 1 enabled integration.
[Object JSON schema](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/objects_schemas/projects_with_enabled_alert_integrations_histogram.json)
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210309165717_projects_with_enabled_alert_integrations_histogram.yml) [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210309165717_projects_with_enabled_alert_integrations_histogram.yml)
Group: `group::monitor` Group: `group::monitor`
......
---
title: Add total distinct count of compliance frameworks to usage ping
merge_request: 60697
author:
type: added
---
key_path: usage_activity_by_stage.manage.custom_compliance_frameworks
name: "count_compliance_management_frameworks"
description: Total count of all custom compliance framework labels
product_section: dev
product_stage: manage
product_group: compliance
product_category: "Compliance management"
value_type: number
status: implemented
milestone: "13.12"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/325545
time_frame: all
data_source: database
distribution:
- ee
tier:
- premium
- ultimate
...@@ -313,6 +313,7 @@ module EE ...@@ -313,6 +313,7 @@ module EE
ldap_users: distinct_count(::GroupMember.of_ldap_type.where(time_period), :user_id), ldap_users: distinct_count(::GroupMember.of_ldap_type.where(time_period), :user_id),
value_stream_management_customized_group_stages: count(::Analytics::CycleAnalytics::GroupStage.where(custom: true)), value_stream_management_customized_group_stages: count(::Analytics::CycleAnalytics::GroupStage.where(custom: true)),
projects_with_compliance_framework: count(::ComplianceManagement::ComplianceFramework::ProjectSettings), projects_with_compliance_framework: count(::ComplianceManagement::ComplianceFramework::ProjectSettings),
custom_compliance_frameworks: count(::ComplianceManagement::Framework),
ldap_servers: ldap_available_servers.size, ldap_servers: ldap_available_servers.size,
ldap_group_sync_enabled: ldap_config_present_for_any_provider?(:group_base), ldap_group_sync_enabled: ldap_config_present_for_any_provider?(:group_base),
ldap_admin_sync_enabled: ldap_config_present_for_any_provider?(:admin_group), ldap_admin_sync_enabled: ldap_config_present_for_any_provider?(:admin_group),
......
...@@ -420,6 +420,7 @@ RSpec.describe Gitlab::UsageData do ...@@ -420,6 +420,7 @@ RSpec.describe Gitlab::UsageData do
create(:group_member, ldap: true, user: user) create(:group_member, ldap: true, user: user)
create(:cycle_analytics_group_stage) create(:cycle_analytics_group_stage)
create(:compliance_framework_project_setting) create(:compliance_framework_project_setting)
create(:compliance_framework)
end end
expect(described_class.usage_activity_by_stage_manage({})).to include( expect(described_class.usage_activity_by_stage_manage({})).to include(
...@@ -427,6 +428,7 @@ RSpec.describe Gitlab::UsageData do ...@@ -427,6 +428,7 @@ RSpec.describe Gitlab::UsageData do
ldap_users: 2, ldap_users: 2,
value_stream_management_customized_group_stages: 2, value_stream_management_customized_group_stages: 2,
projects_with_compliance_framework: 2, projects_with_compliance_framework: 2,
custom_compliance_frameworks: 4,
ldap_servers: 2, ldap_servers: 2,
ldap_group_sync_enabled: true, ldap_group_sync_enabled: true,
ldap_admin_sync_enabled: true, ldap_admin_sync_enabled: true,
...@@ -437,6 +439,7 @@ RSpec.describe Gitlab::UsageData do ...@@ -437,6 +439,7 @@ RSpec.describe Gitlab::UsageData do
ldap_users: 1, ldap_users: 1,
value_stream_management_customized_group_stages: 2, value_stream_management_customized_group_stages: 2,
projects_with_compliance_framework: 2, projects_with_compliance_framework: 2,
custom_compliance_frameworks: 4,
ldap_servers: 2, ldap_servers: 2,
ldap_group_sync_enabled: true, ldap_group_sync_enabled: true,
ldap_admin_sync_enabled: true, ldap_admin_sync_enabled: true,
......
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