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
d69d710f
Commit
d69d710f
authored
Apr 14, 2022
by
Allen Cook
Committed by
Shinya Maeda
Apr 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new metric tracking users that use deployment approvals
parent
ffdcd293
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
0 deletions
+71
-0
config/metrics/counts_28d/20220407183012_count_distinct_user_id_from_deployment_approvals.yml
...3012_count_distinct_user_id_from_deployment_approvals.yml
+21
-0
config/metrics/counts_all/20220407183012_count_distinct_user_id_from_deployment_approvals.yml
...3012_count_distinct_user_id_from_deployment_approvals.yml
+21
-0
ee/lib/gitlab/usage/metrics/instrumentations/count_users_deployment_approvals.rb
...rics/instrumentations/count_users_deployment_approvals.rb
+15
-0
ee/spec/lib/gitlab/usage/metrics/instrumentations/count_users_deployment_approvals_spec.rb
...instrumentations/count_users_deployment_approvals_spec.rb
+14
-0
No files found.
config/metrics/counts_28d/20220407183012_count_distinct_user_id_from_deployment_approvals.yml
0 → 100644
View file @
d69d710f
---
key_path
:
usage_activity_by_stage_monthly.release.users_creating_deployment_approvals
description
:
Users who have used the deployment approvals feature by month
product_section
:
ops
product_stage
:
release
product_group
:
group::release
product_category
:
continuous_delivery
value_type
:
number
status
:
active
milestone
:
"
14.10"
introduced_by_url
:
time_frame
:
28d
data_source
:
database
data_category
:
optional
instrumentation_class
:
CountUsersDeploymentApprovals
performance_indicator_type
:
[]
distribution
:
-
ee
tier
:
-
premium
-
ultimate
config/metrics/counts_all/20220407183012_count_distinct_user_id_from_deployment_approvals.yml
0 → 100644
View file @
d69d710f
---
key_path
:
usage_activity_by_stage.release.users_creating_deployment_approvals
description
:
Users who have used the deployment approvals feature by all time
product_section
:
ops
product_stage
:
release
product_group
:
group::release
product_category
:
continuous_delivery
value_type
:
number
status
:
active
milestone
:
"
14.10"
introduced_by_url
:
time_frame
:
all
data_source
:
database
data_category
:
optional
instrumentation_class
:
CountUsersDeploymentApprovals
performance_indicator_type
:
[]
distribution
:
-
ee
tier
:
-
premium
-
ultimate
ee/lib/gitlab/usage/metrics/instrumentations/count_users_deployment_approvals.rb
0 → 100644
View file @
d69d710f
# frozen_string_literal: true
module
Gitlab
module
Usage
module
Metrics
module
Instrumentations
class
CountUsersDeploymentApprovals
<
DatabaseMetric
operation
:distinct_count
,
column: :user_id
relation
{
::
Deployments
::
Approval
}
end
end
end
end
end
ee/spec/lib/gitlab/usage/metrics/instrumentations/count_users_deployment_approvals_spec.rb
0 → 100644
View file @
d69d710f
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Usage
::
Metrics
::
Instrumentations
::
CountUsersDeploymentApprovals
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:deployment_approval
)
{
create
(
:deployment_approval
,
user:
user
)
}
let_it_be
(
:deployment_approval2
)
{
create
(
:deployment_approval
,
user:
user
)
}
let
(
:expected_value
)
{
1
}
let
(
:expected_query
)
{
'SELECT COUNT(DISTINCT "deployment_approvals"."user_id") FROM "deployment_approvals"'
}
it_behaves_like
'a correct instrumented metric value and query'
,
{
time_frame:
'all'
}
end
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