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
103d9b68
Commit
103d9b68
authored
May 03, 2021
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track users awarding epic emoji
- tests - update metric dictionary
parent
2c4abf28
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
127 additions
and
5 deletions
+127
-5
doc/development/usage_ping/dictionary.md
doc/development/usage_ping/dictionary.md
+28
-2
ee/app/services/ee/award_emojis/add_service.rb
ee/app/services/ee/award_emojis/add_service.rb
+5
-0
ee/changelogs/unreleased/292253-cablett-epic-emoji.yml
ee/changelogs/unreleased/292253-cablett-epic-emoji.yml
+5
-0
ee/config/metrics/counts_28d/20210503011217_g_project_management_users_awarding_epic_emoji_monthly.yml
..._project_management_users_awarding_epic_emoji_monthly.yml
+18
-0
ee/config/metrics/counts_7d/20210503011355_g_project_management_users_awarding_epic_emoji_weekly.yml
...g_project_management_users_awarding_epic_emoji_weekly.yml
+18
-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
+10
-0
ee/spec/services/award_emojis/add_service_spec.rb
ee/spec/services/award_emojis/add_service_spec.rb
+30
-3
lib/gitlab/usage_data_counters/known_events/epic_events.yml
lib/gitlab/usage_data_counters/known_events/epic_events.yml
+8
-0
No files found.
doc/development/usage_ping/dictionary.md
View file @
103d9b68
...
...
@@ -6430,7 +6430,7 @@ Tiers: `free`, `premium`, `ultimate`
### `database.pg_system_id`
Missing description
TBD
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183248_pg_system_id.yml
)
...
...
@@ -7764,7 +7764,7 @@ Tiers: `free`, `premium`, `ultimate`
Number of projects using 5 min production app CI template in last 7 days.
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/
ee/
config/metrics/counts_7d/20210216184515_p_ci_templates_5_min_production_app_weekly.yml
)
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210216184515_p_ci_templates_5_min_production_app_weekly.yml
)
Group:
`group::5-min-app`
...
...
@@ -10412,6 +10412,30 @@ Status: `implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_awarding_epic_emoji_monthly`
Counts of MAU awarding emoji on epic
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210503011217_g_project_management_users_awarding_epic_emoji_monthly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_awarding_epic_emoji_weekly`
Counts of WAU awarding emoji on epic
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210503011355_g_project_management_users_awarding_epic_emoji_weekly.yml
)
Group:
`group::product planning`
Status:
`implemented`
Tiers:
`premium`
,
`ultimate`
### `redis_hll_counters.epics_usage.g_project_management_users_creating_epic_notes_monthly`
Counts of MAU adding epic notes
...
...
@@ -16010,6 +16034,8 @@ Tiers: `free`
Histogram (buckets 1 to 100) of projects with at least 1 enabled integration.
[
Object JSON schema
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/objects_schemas/projects_with_enabled_alert_integrations_histogram.json
)
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210309165717_projects_with_enabled_alert_integrations_histogram.yml
)
Group:
`group::monitor`
...
...
ee/app/services/ee/award_emojis/add_service.rb
View file @
103d9b68
...
...
@@ -12,6 +12,11 @@ module EE
super
::
Gitlab
::
StatusPage
.
trigger_publish
(
project
,
current_user
,
award
)
track_epic_emoji_awarded
if
awardable
.
is_a?
(
Epic
)
end
def
track_epic_emoji_awarded
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
.
track_epic_emoji_awarded_action
(
author:
current_user
)
end
end
end
...
...
ee/changelogs/unreleased/292253-cablett-epic-emoji.yml
0 → 100644
View file @
103d9b68
---
title
:
Track epic emoji award via usage ping
merge_request
:
60787
author
:
type
:
other
ee/config/metrics/counts_28d/20210503011217_g_project_management_users_awarding_epic_emoji_monthly.yml
0 → 100644
View file @
103d9b68
---
key_path
:
redis_hll_counters.epics_usage.g_project_management_users_awarding_epic_emoji_monthly
description
:
Counts of MAU awarding emoji on epic
product_section
:
dev
product_stage
:
plan
product_group
:
group::product planning
product_category
:
epics_usage
value_type
:
number
status
:
implemented
milestone
:
"
13.12"
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60787
time_frame
:
28d
data_source
:
redis_hll
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/config/metrics/counts_7d/20210503011355_g_project_management_users_awarding_epic_emoji_weekly.yml
0 → 100644
View file @
103d9b68
---
key_path
:
redis_hll_counters.epics_usage.g_project_management_users_awarding_epic_emoji_weekly
description
:
Counts of WAU awarding emoji on epic
product_section
:
dev
product_stage
:
plan
product_group
:
group::product planning
product_category
:
epics_usage
value_type
:
number
status
:
implemented
milestone
:
"
13.12"
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60787
time_frame
:
28d
data_source
:
redis_hll
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/lib/gitlab/usage_data_counters/epic_activity_unique_counter.rb
View file @
103d9b68
...
...
@@ -13,6 +13,7 @@ module Gitlab
EPIC_NOTE_CREATED
=
'g_project_management_users_creating_epic_notes'
EPIC_NOTE_UPDATED
=
'g_project_management_users_updating_epic_notes'
EPIC_NOTE_DESTROYED
=
'g_project_management_users_destroying_epic_notes'
EPIC_EMOJI_AWARDED
=
'g_project_management_users_awarding_epic_emoji'
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_DUE_DATE_SET_AS_FIXED
=
'g_project_management_users_setting_epic_due_date_as_fixed'
...
...
@@ -55,6 +56,10 @@ module Gitlab
track_unique_action
(
EPIC_NOTE_DESTROYED
,
author
)
end
def
track_epic_emoji_awarded_action
(
author
:)
track_unique_action
(
EPIC_EMOJI_AWARDED
,
author
)
end
def
track_epic_start_date_set_as_fixed_action
(
author
:)
track_unique_action
(
EPIC_START_DATE_SET_AS_FIXED
,
author
)
end
...
...
ee/spec/lib/gitlab/usage_data_counters/epic_activity_unique_counter_spec.rb
View file @
103d9b68
...
...
@@ -74,6 +74,16 @@ RSpec.describe Gitlab::UsageDataCounters::EpicActivityUniqueCounter, :clean_gitl
end
end
context
'for epic emoji award event'
do
def
track_action
(
params
)
described_class
.
track_epic_emoji_awarded_action
(
**
params
)
end
it_behaves_like
'a daily tracked issuable event'
do
let
(
:action
)
{
described_class
::
EPIC_EMOJI_AWARDED
}
end
end
context
'for epic closing event'
do
def
track_action
(
params
)
described_class
.
track_epic_closed_action
(
**
params
)
...
...
ee/spec/services/award_emojis/add_service_spec.rb
View file @
103d9b68
...
...
@@ -4,16 +4,18 @@ require 'spec_helper'
RSpec
.
describe
AwardEmojis
::
AddService
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:group
)
{
create
(
:group
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:awardable
)
{
create
(
:note_on_issue
,
project:
project
)
}
let
(
:name
)
{
'thumbsup'
}
subjec
t
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
le
t
(
:service
)
{
described_class
.
new
(
awardable
,
name
,
user
)
}
describe
'#execute'
do
subject
(
:execute
)
{
service
.
execute
}
describe
'publish to status page'
do
let
(
:execute
)
{
service
.
execute
}
let
(
:issue_id
)
{
awardable
.
noteable_id
}
context
'when adding succeeds'
do
...
...
@@ -36,5 +38,30 @@ RSpec.describe AwardEmojis::AddService do
include_examples
'no trigger status page publish'
end
end
describe
'tracking emoji adding'
do
context
'for epics'
do
let_it_be
(
:awardable
)
{
create
(
:epic
,
group:
group
)
}
before
do
stub_licensed_features
(
epics:
true
)
group
.
add_developer
(
user
)
end
it
'tracks usage'
do
expect
(
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
).
to
receive
(
:track_epic_emoji_awarded_action
)
described_class
.
new
(
awardable
,
name
,
user
).
execute
end
end
context
'for awardables that are not epics'
do
it
'does not track epic emoji awarding'
do
expect
(
::
Gitlab
::
UsageDataCounters
::
EpicActivityUniqueCounter
).
not_to
receive
(
:track_epic_emoji_awarded_action
)
execute
end
end
end
end
end
lib/gitlab/usage_data_counters/known_events/epic_events.yml
View file @
103d9b68
...
...
@@ -41,6 +41,14 @@
aggregation
:
daily
feature_flag
:
track_epics_activity
# emoji
-
name
:
g_project_management_users_awarding_epic_emoji
category
:
epics_usage
redis_slot
:
project_management
aggregation
:
daily
feature_flag
:
track_epics_activity
# start date events
-
name
:
g_project_management_users_setting_epic_start_date_as_fixed
...
...
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