Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7a4c6e06
Commit
7a4c6e06
authored
Mar 12, 2021
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Record issues added to epic on usage ping
Record issues addded to epic by users using HLL redis counters.
parent
9e60cb39
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
105 additions
and
0 deletions
+105
-0
doc/development/usage_ping/dictionary.md
doc/development/usage_ping/dictionary.md
+24
-0
ee/app/services/epic_issues/create_service.rb
ee/app/services/epic_issues/create_service.rb
+5
-0
ee/changelogs/unreleased/issue_292253-track_epic_issue.yml
ee/changelogs/unreleased/issue_292253-track_epic_issue.yml
+5
-0
ee/config/metrics/counts_28d/20210312144719_g_product_planning_epic_issue_added_monthly.yml
...312144719_g_product_planning_epic_issue_added_monthly.yml
+21
-0
ee/config/metrics/counts_7d/20210312181918_g_product_planning_epic_issue_added_weekly.yml
...0312181918_g_product_planning_epic_issue_added_weekly.yml
+21
-0
ee/lib/gitlab/usage_data_counters/epic_activity_unique_counter.rb
...itlab/usage_data_counters/epic_activity_unique_counter.rb
+5
-0
ee/spec/lib/gitlab/usage_data_counters/epic_activity_unique_counter_spec.rb
.../usage_data_counters/epic_activity_unique_counter_spec.rb
+12
-0
ee/spec/services/epic_issues/create_service_spec.rb
ee/spec/services/epic_issues/create_service_spec.rb
+6
-0
lib/gitlab/usage_data_counters/known_events/epic_events.yml
lib/gitlab/usage_data_counters/known_events/epic_events.yml
+6
-0
No files found.
doc/development/usage_ping/dictionary.md
View file @
7a4c6e06
...
...
@@ -9812,6 +9812,30 @@ Status: `implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_epic_issue_added_monthly`
Count of MAU adding issues to epics
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210312144719_g_product_planning_epic_issue_added_monthly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_epic_issue_added_weekly`
Count of WAU adding issues to epics
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210312181918_g_product_planning_epic_issue_added_weekly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_destroying_epic_notes_monthly`
Counts of MAU destroying epic notes
...
...
ee/app/services/epic_issues/create_service.rb
View file @
7a4c6e06
...
...
@@ -19,6 +19,7 @@ module EpicIssues
if
link
.
save
create_notes
(
referenced_issue
,
params
)
usage_ping_record_epic_issue_added
end
link
...
...
@@ -64,5 +65,9 @@ module EpicIssues
def
issuable_group_descendants
@descendants
||=
issuable
.
group
.
self_and_descendants
end
def
usage_ping_record_epic_issue_added
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
.
track_epic_issue_added
(
author:
current_user
)
end
end
end
ee/changelogs/unreleased/issue_292253-track_epic_issue.yml
0 → 100644
View file @
7a4c6e06
---
title
:
Record issues added to epic on usage ping
merge_request
:
56559
author
:
type
:
other
ee/config/metrics/counts_28d/20210312144719_g_product_planning_epic_issue_added_monthly.yml
0 → 100644
View file @
7a4c6e06
---
# Name of this metric contains g_project_management prefix
# because we are using the same slot from issue_tracking to
# allow data aggregation.
key_path
:
redis_hll_counters.epics_usage.g_project_management_epic_issue_added_monthly
description
:
Count of MAU adding issues to epics
product_section
:
dev
product_stage
:
plan
product_group
:
group::product planning
product_category
:
epics_usage
value_type
:
number
status
:
implemented
milestone
:
"
13.11"
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56559
time_frame
:
28d
data_source
:
redis_hll
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/config/metrics/counts_7d/20210312181918_g_product_planning_epic_issue_added_weekly.yml
0 → 100644
View file @
7a4c6e06
---
# Name of this metric contains g_project_management prefix
# because we are using the same slot from issue_tracking to
# allow data aggregation.
key_path
:
redis_hll_counters.epics_usage.g_project_management_epic_issue_added_weekly
description
:
Count of WAU adding issues to epics
product_section
:
dev
product_stage
:
plan
product_group
:
group::product planning
product_category
:
epics_usage
value_type
:
number
status
:
implemented
milestone
:
"
13.11"
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56559
time_frame
:
7d
data_source
:
redis_hll
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/lib/gitlab/usage_data_counters/epic_activity_unique_counter.rb
View file @
7a4c6e06
...
...
@@ -12,6 +12,7 @@ module Gitlab
EPIC_NOTE_DESTROYED
=
'g_project_management_users_destroying_epic_notes'
EPIC_START_DATE_SET_AS_FIXED
=
'g_project_management_users_setting_epic_start_date_as_fixed'
EPIC_START_DATE_SET_AS_INHERITED
=
'g_project_management_users_setting_epic_start_date_as_inherited'
EPIC_ISSUE_ADDED
=
'g_project_management_epic_issue_added'
class
<<
self
def
track_epic_created_action
(
author
:,
time:
Time
.
zone
.
now
)
...
...
@@ -34,6 +35,10 @@ module Gitlab
track_unique_action
(
EPIC_START_DATE_SET_AS_INHERITED
,
author
,
time
)
end
def
track_epic_issue_added
(
author
:,
time:
Time
.
zone
.
now
)
track_unique_action
(
EPIC_ISSUE_ADDED
,
author
,
time
)
end
private
def
track_unique_action
(
action
,
author
,
time
)
...
...
ee/spec/lib/gitlab/usage_data_counters/epic_activity_unique_counter_spec.rb
View file @
7a4c6e06
...
...
@@ -69,4 +69,16 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
it_behaves_like
'does not track when feature flag is disabled'
,
:track_epics_activity
end
end
context
'for adding issue to epic event'
do
def
track_action
(
params
)
described_class
.
track_epic_issue_added
(
**
params
)
end
it_behaves_like
'a daily tracked issuable event'
do
let
(
:action
)
{
described_class
::
EPIC_ISSUE_ADDED
}
end
it_behaves_like
'does not track when feature flag is disabled'
,
:track_epics_activity
end
end
ee/spec/services/epic_issues/create_service_spec.rb
View file @
7a4c6e06
...
...
@@ -66,6 +66,12 @@ RSpec.describe EpicIssues::CreateService do
expect
(
note
.
noteable_type
).
to
eq
(
'Issue'
)
expect
(
note
.
system_note_metadata
.
action
).
to
eq
(
'issue_added_to_epic'
)
end
it
'records action on usage ping'
do
expect
(
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
).
to
receive
(
:track_epic_issue_added
).
with
(
author:
user
)
subject
end
end
shared_examples
'returns an error'
do
...
...
lib/gitlab/usage_data_counters/known_events/epic_events.yml
View file @
7a4c6e06
...
...
@@ -32,3 +32,9 @@
redis_slot
:
project_management
aggregation
:
daily
feature_flag
:
track_epics_activity
-
name
:
g_project_management_epic_issue_added
category
:
epics_usage
redis_slot
:
project_management
aggregation
:
daily
feature_flag
:
track_epics_activity
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment