Commit b2f7703d authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'deprecate-alerts-service-metric' into 'master'

Deprecate Alerts service metric

See merge request gitlab-org/gitlab!59899
parents 99c6896c c0dc5035
---
title: Deprecate Alerts service metric
merge_request: 59899
author:
type: deprecated
......@@ -6,7 +6,7 @@ product_stage: monitor
product_group: group::health
product_category: incident_management
value_type: number
status: data_available
status: deprecated
time_frame: all
data_source: database
distribution:
......
......@@ -4756,7 +4756,7 @@ Count of projects that have enabled the Alerts service
Group: `group::health`
Status: `data_available`
Status: `deprecated`
Tiers: `free`, `premium`, `ultimate`
......
......@@ -164,7 +164,7 @@ module Gitlab
projects_with_repositories_enabled: count(ProjectFeature.where('repository_access_level > ?', ProjectFeature::DISABLED)),
projects_with_tracing_enabled: count(ProjectTracingSetting),
projects_with_error_tracking_enabled: count(::ErrorTracking::ProjectErrorTrackingSetting.where(enabled: true)),
projects_with_alerts_service_enabled: count(Service.active.where(type: 'AlertsService')),
projects_with_alerts_service_enabled: DEPRECATED_VALUE,
projects_with_alerts_created: distinct_count(::AlertManagement::Alert, :project_id),
projects_with_enabled_alert_integrations: distinct_count(::AlertManagement::HttpIntegration.active, :project_id),
projects_with_prometheus_alerts: distinct_count(PrometheusAlert, :project_id),
......
......@@ -32,8 +32,6 @@ FactoryBot.define do
create(:service, project: projects[2], type: 'CustomIssueTrackerService', active: true)
create(:project_error_tracking_setting, project: projects[0])
create(:project_error_tracking_setting, project: projects[1], enabled: false)
create(:service, project: projects[0], type: 'AlertsService', active: true)
create(:service, project: projects[1], type: 'AlertsService', active: false)
alert_bot_issues = create_list(:incident, 2, project: projects[0], author: User.alert_bot)
create_list(:incident, 2, project: projects[1], author: User.alert_bot)
issues = create_list(:issue, 4, project: projects[0])
......
......@@ -571,7 +571,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(count_data[:projects_with_repositories_enabled]).to eq(3)
expect(count_data[:projects_with_error_tracking_enabled]).to eq(1)
expect(count_data[:projects_with_tracing_enabled]).to eq(1)
expect(count_data[:projects_with_alerts_service_enabled]).to eq(1)
expect(count_data[:projects_with_alerts_service_enabled]).to eq(Gitlab::UsageData::DEPRECATED_VALUE)
expect(count_data[:projects_with_enabled_alert_integrations]).to eq(1)
expect(count_data[:projects_with_prometheus_alerts]).to eq(2)
expect(count_data[:projects_with_terraform_reports]).to eq(2)
......
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