Commit 9134e8b8 authored by Terri Chu's avatar Terri Chu

Merge branch 'issue_355471-count_blocked_epics_on_usage_data' into 'master'

Track blocked epics added on usage ping

See merge request gitlab-org/gitlab!84503
parents bcc34c4c 37be6bcf
......@@ -48,6 +48,7 @@ options:
- g_project_management_epic_related_removed
- g_project_management_epic_blocking_added
- g_project_management_epic_blocking_removed
- g_project_management_epic_blocked_added
distribution:
- ee
tier:
......
---
key_path: redis_hll_counters.epics_usage.g_project_management_epic_blocked_added_monthly
description: Count of MAU adding blocked epics
product_section: dev
product_stage: plan
product_group: group::product planning
product_category: epics_usage
value_type: number
status: active
milestone: "15.0"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84503
time_frame: 28d
data_source: redis_hll
data_category: optional
instrumentation_class: RedisHLLMetric
options:
events:
- g_project_management_epic_blocked_added
distribution:
- ee
tier:
- ultimate
......@@ -48,6 +48,7 @@ options:
- g_project_management_epic_related_removed
- g_project_management_epic_blocking_added
- g_project_management_epic_blocking_removed
- g_project_management_epic_blocked_added
distribution:
- ee
tier:
......
---
key_path: redis_hll_counters.epics_usage.g_project_management_epic_blocked_added_weekly
description: Count of WAU adding blocked epics
product_section: dev
product_stage: plan
product_group: group::product planning
product_category: epics_usage
value_type: number
status: active
milestone: "15.0"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84503
time_frame: 7d
data_source: redis_hll
data_category: optional
instrumentation_class: RedisHLLMetric
options:
events:
- g_project_management_epic_blocked_added
distribution:
- ee
tier:
- ultimate
......@@ -39,6 +39,7 @@ module Gitlab
EPIC_RELATED_REMOVED = 'g_project_management_epic_related_removed'
EPIC_BLOCKING_ADDED = 'g_project_management_epic_blocking_added'
EPIC_BLOCKING_REMOVED = 'g_project_management_epic_blocking_removed'
EPIC_BLOCKED_ADDED = 'g_project_management_epic_blocked_added'
class << self
def track_epic_created_action(author:)
......@@ -170,6 +171,7 @@ module Gitlab
end
def track_linked_epic_with_type_is_blocked_by_added(author:)
track_unique_action(EPIC_BLOCKED_ADDED, author)
end
private
......
......@@ -385,4 +385,16 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity
end
context 'for blocked epic added' do
def track_action(params)
described_class.track_linked_epic_with_type_is_blocked_by_added(**params)
end
it_behaves_like 'a daily tracked issuable event' do
let(:action) { described_class::EPIC_BLOCKED_ADDED }
end
it_behaves_like 'does not track when feature flag is disabled', :track_epics_activity
end
end
......@@ -80,6 +80,13 @@ RSpec.describe Epics::RelatedEpicLinks::CreateService do
it_behaves_like 'a recorded event'
end
context 'for is_blocked_by link_type' do
let(:link_type) { IssuableLink::TYPE_IS_BLOCKED_BY }
let(:tracking_method_name) { :track_linked_epic_with_type_is_blocked_by_added }
it_behaves_like 'a recorded event'
end
end
end
end
......@@ -212,3 +212,9 @@
redis_slot: project_management
aggregation: daily
feature_flag: track_epics_activity
- name: g_project_management_epic_blocked_added
category: epics_usage
redis_slot: project_management
aggregation: daily
feature_flag: track_epics_activity
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