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
e636cfa7
Commit
e636cfa7
authored
May 07, 2021
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'am-add-boards-metric' into 'master'
Add CountBoardsMetric See merge request gitlab-org/gitlab!60022
parents
06d92619
e952adee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
6 deletions
+35
-6
config/metrics/counts_all/20210216181252_boards.yml
config/metrics/counts_all/20210216181252_boards.yml
+6
-5
doc/development/usage_ping/dictionary.md
doc/development/usage_ping/dictionary.md
+1
-1
lib/gitlab/usage/metrics/instrumentations/count_boards_metric.rb
...lab/usage/metrics/instrumentations/count_boards_metric.rb
+15
-0
spec/lib/gitlab/usage/metrics/instrumentations/count_boards_metric_spec.rb
...sage/metrics/instrumentations/count_boards_metric_spec.rb
+9
-0
spec/lib/gitlab/usage_data_metrics_spec.rb
spec/lib/gitlab/usage_data_metrics_spec.rb
+4
-0
No files found.
config/metrics/counts_all/20210216181252_boards.yml
View file @
e636cfa7
---
key_path
:
counts.boards
description
:
Count of
total Boards created
description
:
Count of
Boards created
product_section
:
dev
product_stage
:
plan
product_group
:
group::project management
product_category
:
boards
product_category
:
boards
value_type
:
number
status
:
data_available
time_frame
:
all
data_source
:
database
instrumentation_class
:
'
Gitlab::Usage::Metrics::Instrumentations::CountBoardsMetric'
distribution
:
-
ce
-
ee
-
ee
tier
:
-
free
-
premium
-
ultimate
-
premium
-
ultimate
doc/development/usage_ping/dictionary.md
View file @
e636cfa7
...
...
@@ -468,7 +468,7 @@ Tiers: `free`
### `counts.boards`
Count of
total
Boards created
Count of Boards created
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216181252_boards.yml)
...
...
lib/gitlab/usage/metrics/instrumentations/count_boards_metric.rb
0 → 100644
View file @
e636cfa7
# frozen_string_literal: true
module
Gitlab
module
Usage
module
Metrics
module
Instrumentations
class
CountBoardsMetric
<
DatabaseMetric
operation
:count
relation
{
Board
}
end
end
end
end
end
spec/lib/gitlab/usage/metrics/instrumentations/count_boards_metric_spec.rb
0 → 100644
View file @
e636cfa7
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Usage
::
Metrics
::
Instrumentations
::
CountBoardsMetric
do
let_it_be
(
:board
)
{
create
(
:board
)
}
it_behaves_like
'a correct instrumented metric value'
,
{
time_frame:
'all'
,
data_source:
'database'
},
1
end
spec/lib/gitlab/usage_data_metrics_spec.rb
View file @
e636cfa7
...
...
@@ -20,6 +20,10 @@ RSpec.describe Gitlab::UsageDataMetrics do
it
'includes top level keys'
do
expect
(
subject
).
to
include
(
:uuid
)
end
it
'includes counts keys'
do
expect
(
subject
[
:counts
]).
to
include
(
:boards
)
end
end
end
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