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
9f1ca432
Commit
9f1ca432
authored
Mar 15, 2021
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track epic promoted action
Record issue promoted to epic on usage ping Redis HLL
parent
8ef5a6d0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
0 deletions
+98
-0
doc/development/usage_ping/dictionary.md
doc/development/usage_ping/dictionary.md
+24
-0
ee/app/services/epics/issue_promote_service.rb
ee/app/services/epics/issue_promote_service.rb
+2
-0
ee/config/metrics/counts_28d/20210331193236_g_project_management_issue_promoted_to_epic_monthly.yml
...6_g_project_management_issue_promoted_to_epic_monthly.yml
+21
-0
ee/config/metrics/counts_7d/20210331192332_g_project_management_issue_promoted_to_epic_weekly.yml
...32_g_project_management_issue_promoted_to_epic_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/epics/issue_promote_service_spec.rb
ee/spec/services/epics/issue_promote_service_spec.rb
+7
-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 @
9f1ca432
...
@@ -9908,6 +9908,30 @@ Status: `implemented`
...
@@ -9908,6 +9908,30 @@ Status: `implemented`
Tiers:
`premium`
,
`ultimate`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_issue_promoted_to_epic_monthly`
Count of MAU promoting issues to epics
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210331193236_g_project_management_issue_promoted_to_epic_monthly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_issue_promoted_to_epic_weekly`
Counts of WAU promoting issues to epics
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210331192332_g_project_management_issue_promoted_to_epic_weekly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_creating_epic_notes_monthly`
### `redis_hll_counters.epics_usage.g_project_management_users_creating_epic_notes_monthly`
Counts of MAU adding epic notes
Counts of MAU adding epic notes
...
...
ee/app/services/epics/issue_promote_service.rb
View file @
9f1ca432
...
@@ -34,6 +34,8 @@ module Epics
...
@@ -34,6 +34,8 @@ module Epics
def
track_event
def
track_event
::
Gitlab
::
Tracking
.
event
(
'epics'
,
'promote'
,
property:
'issue_id'
,
value:
original_entity
.
id
,
::
Gitlab
::
Tracking
.
event
(
'epics'
,
'promote'
,
property:
'issue_id'
,
value:
original_entity
.
id
,
project:
issue
.
project
,
user:
current_user
,
namespace:
@parent_group
)
project:
issue
.
project
,
user:
current_user
,
namespace:
@parent_group
)
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
.
track_issue_promoted_to_epic
(
author:
current_user
)
end
end
def
create_new_entity
def
create_new_entity
...
...
ee/config/metrics/counts_28d/20210331193236_g_project_management_issue_promoted_to_epic_monthly.yml
0 → 100644
View file @
9f1ca432
---
# 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_issue_promoted_to_epic_monthly
description
:
Count of MAU promoting 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/56706
time_frame
:
28d
data_source
:
redis_hll
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/config/metrics/counts_7d/20210331192332_g_project_management_issue_promoted_to_epic_weekly.yml
0 → 100644
View file @
9f1ca432
---
# 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_issue_promoted_to_epic_weekly
description
:
Counts of WAU promoting 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/56706
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 @
9f1ca432
...
@@ -22,6 +22,7 @@ module Gitlab
...
@@ -22,6 +22,7 @@ module Gitlab
EPIC_ISSUE_ADDED
=
'g_project_management_epic_issue_added'
EPIC_ISSUE_ADDED
=
'g_project_management_epic_issue_added'
EPIC_CLOSED
=
'g_project_management_epic_closed'
EPIC_CLOSED
=
'g_project_management_epic_closed'
EPIC_REOPENED
=
'g_project_management_epic_reopened'
EPIC_REOPENED
=
'g_project_management_epic_reopened'
ISSUE_PROMOTED_TO_EPIC
=
'g_project_management_issue_promoted_to_epic'
class
<<
self
class
<<
self
def
track_epic_created_action
(
author
:)
def
track_epic_created_action
(
author
:)
...
@@ -84,6 +85,10 @@ module Gitlab
...
@@ -84,6 +85,10 @@ module Gitlab
track_unique_action
(
EPIC_REOPENED
,
author
)
track_unique_action
(
EPIC_REOPENED
,
author
)
end
end
def
track_issue_promoted_to_epic
(
author
:)
track_unique_action
(
ISSUE_PROMOTED_TO_EPIC
,
author
)
end
private
private
def
track_unique_action
(
action
,
author
)
def
track_unique_action
(
action
,
author
)
...
...
ee/spec/lib/gitlab/usage_data_counters/epic_activity_unique_counter_spec.rb
View file @
9f1ca432
...
@@ -187,4 +187,16 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
...
@@ -187,4 +187,16 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
it_behaves_like
'does not track when feature flag is disabled'
,
:track_epics_activity
it_behaves_like
'does not track when feature flag is disabled'
,
:track_epics_activity
end
end
context
'for promoting issue to epic'
do
def
track_action
(
params
)
described_class
.
track_issue_promoted_to_epic
(
**
params
)
end
it_behaves_like
'a daily tracked issuable event'
do
let
(
:action
)
{
described_class
::
ISSUE_PROMOTED_TO_EPIC
}
end
it_behaves_like
'does not track when feature flag is disabled'
,
:track_epics_activity
end
end
end
ee/spec/services/epics/issue_promote_service_spec.rb
View file @
9f1ca432
...
@@ -57,6 +57,13 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do
...
@@ -57,6 +57,13 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do
end
end
end
end
it
'counts a usage ping event'
do
expect
(
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
).
to
receive
(
:track_issue_promoted_to_epic
)
.
with
(
author:
user
)
subject
.
execute
(
issue
)
end
context
'when promoting issue'
,
:snowplow
do
context
'when promoting issue'
,
:snowplow
do
let!
(
:issue_mentionable_note
)
{
create
(
:note
,
noteable:
issue
,
author:
user
,
project:
project
,
note:
"note with mention
#{
user
.
to_reference
}
"
)
}
let!
(
:issue_mentionable_note
)
{
create
(
:note
,
noteable:
issue
,
author:
user
,
project:
project
,
note:
"note with mention
#{
user
.
to_reference
}
"
)
}
let!
(
:issue_note
)
{
create
(
:note
,
noteable:
issue
,
author:
user
,
project:
project
,
note:
"note without mention"
)
}
let!
(
:issue_note
)
{
create
(
:note
,
noteable:
issue
,
author:
user
,
project:
project
,
note:
"note without mention"
)
}
...
...
lib/gitlab/usage_data_counters/known_events/epic_events.yml
View file @
9f1ca432
...
@@ -98,3 +98,9 @@
...
@@ -98,3 +98,9 @@
redis_slot
:
project_management
redis_slot
:
project_management
aggregation
:
daily
aggregation
:
daily
feature_flag
:
track_epics_activity
feature_flag
:
track_epics_activity
-
name
:
'
g_project_management_issue_promoted_to_epic'
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