Commit c52c0fd4 authored by Luis Mejia's avatar Luis Mejia Committed by Tetiana Chupryna

Add instrumentation_class to incident_management event metrics

Migrates metrics definition for RedisHLL events in
[common.yml](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/usage_data_counters/known_events/common.yml)
with `category: incident_management`, to use instrumentation class

This category includes:

14 metrics + 1 total for `incident_management` 1 metric for
`incident_management_alerts` 1 metric for `incident_management_oncall`

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/333117
parent a8c5d692
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_status_changed
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_assigned
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_todo
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_created
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_reopened
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_closed
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_assigned
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_todo
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_comment
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_zoom_meeting
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_relate
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_unrelate
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_change_confidential
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,23 @@ value_type: number ...@@ -10,6 +10,23 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_created
- incident_management_incident_reopened
- incident_management_incident_closed
- incident_management_incident_assigned
- incident_management_incident_todo
- incident_management_incident_comment
- incident_management_incident_zoom_meeting
- incident_management_incident_published
- incident_management_incident_relate
- incident_management_incident_unrelate
- incident_management_incident_change_confidential
- incident_management_alert_status_changed
- incident_management_alert_assigned
- incident_management_alert_todo
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -11,6 +11,10 @@ value_type: number ...@@ -11,6 +11,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_create_incident
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_status_changed
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_assigned
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_todo
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_created
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_reopened
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_closed
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_assigned
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_todo
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_comment
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_zoom_meeting
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_relate
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_unrelate
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_change_confidential
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,23 @@ value_type: number ...@@ -10,6 +10,23 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_created
- incident_management_incident_reopened
- incident_management_incident_closed
- incident_management_incident_assigned
- incident_management_incident_todo
- incident_management_incident_comment
- incident_management_incident_zoom_meeting
- incident_management_incident_published
- incident_management_incident_relate
- incident_management_incident_unrelate
- incident_management_incident_change_confidential
- incident_management_alert_status_changed
- incident_management_alert_assigned
- incident_management_alert_todo
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -11,6 +11,10 @@ value_type: number ...@@ -11,6 +11,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_alert_create_incident
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_published
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -12,6 +12,10 @@ milestone: "13.11" ...@@ -12,6 +12,10 @@ milestone: "13.11"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58606 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58606
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- i_incident_management_oncall_notification_sent
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- incident_management_incident_published
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -12,6 +12,10 @@ milestone: "13.11" ...@@ -12,6 +12,10 @@ milestone: "13.11"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58606 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58606
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- i_incident_management_oncall_notification_sent
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -22,6 +22,18 @@ RSpec.describe Gitlab::UsageDataMetrics do ...@@ -22,6 +22,18 @@ RSpec.describe Gitlab::UsageDataMetrics do
expect(subject).to include(:license_subscription_id) expect(subject).to include(:license_subscription_id)
end end
it 'includes incident_management_incident_published monthly and weekly keys' do
expect(subject[:redis_hll_counters][:incident_management]).to include(
:incident_management_incident_published_monthly, :incident_management_incident_published_weekly
)
end
it 'includes incident_management_oncall monthly and weekly keys' do
expect(subject[:redis_hll_counters][:incident_management_oncall].keys).to contain_exactly(*[
:i_incident_management_oncall_notification_sent_monthly, :i_incident_management_oncall_notification_sent_weekly
])
end
it 'includes compliance monthly and weekly keys' do it 'includes compliance monthly and weekly keys' do
expect(subject[:redis_hll_counters][:compliance].keys).to contain_exactly(*[ expect(subject[:redis_hll_counters][:compliance].keys).to contain_exactly(*[
:g_compliance_dashboard_monthly, :g_compliance_dashboard_weekly, :g_compliance_dashboard_monthly, :g_compliance_dashboard_weekly,
......
...@@ -41,6 +41,31 @@ RSpec.describe Gitlab::UsageDataMetrics do ...@@ -41,6 +41,31 @@ RSpec.describe Gitlab::UsageDataMetrics do
]) ])
end end
it 'includes incident_management_alerts monthly and weekly keys' do
expect(subject[:redis_hll_counters][:incident_management_alerts].keys).to contain_exactly(*[
:incident_management_alert_create_incident_monthly, :incident_management_alert_create_incident_weekly
])
end
it 'includes incident_management monthly and weekly keys' do
expect(subject[:redis_hll_counters][:incident_management]).to include(
:incident_management_incident_created_monthly, :incident_management_incident_created_weekly,
:incident_management_incident_reopened_monthly, :incident_management_incident_reopened_weekly,
:incident_management_incident_closed_monthly, :incident_management_incident_closed_weekly,
:incident_management_incident_assigned_monthly, :incident_management_incident_assigned_weekly,
:incident_management_incident_todo_monthly, :incident_management_incident_todo_weekly,
:incident_management_incident_comment_monthly, :incident_management_incident_comment_weekly,
:incident_management_incident_zoom_meeting_monthly, :incident_management_incident_zoom_meeting_weekly,
:incident_management_incident_relate_monthly, :incident_management_incident_relate_weekly,
:incident_management_incident_unrelate_monthly, :incident_management_incident_unrelate_weekly,
:incident_management_incident_change_confidential_monthly, :incident_management_incident_change_confidential_weekly,
:incident_management_alert_status_changed_monthly, :incident_management_alert_status_changed_weekly,
:incident_management_alert_assigned_monthly, :incident_management_alert_assigned_weekly,
:incident_management_alert_todo_monthly, :incident_management_alert_todo_weekly,
:incident_management_total_unique_counts_monthly, :incident_management_total_unique_counts_weekly
)
end
it 'includes source_code monthly and weekly keys' do it 'includes source_code monthly and weekly keys' do
expect(subject[:redis_hll_counters][:source_code].keys).to contain_exactly(*[ expect(subject[:redis_hll_counters][:source_code].keys).to contain_exactly(*[
:wiki_action_monthly, :wiki_action_weekly, :wiki_action_monthly, :wiki_action_weekly,
......
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