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
192951b4
Commit
192951b4
authored
Feb 12, 2021
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve metrics generator
parent
795fbb0c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
doc/development/usage_ping/metrics_dictionary.md
doc/development/usage_ping/metrics_dictionary.md
+7
-2
generator_templates/usage_metric_definition/metric_definition.yml
...r_templates/usage_metric_definition/metric_definition.yml
+9
-4
lib/generators/gitlab/usage_metric_definition_generator.rb
lib/generators/gitlab/usage_metric_definition_generator.rb
+7
-3
No files found.
doc/development/usage_ping/metrics_dictionary.md
View file @
192951b4
...
@@ -59,8 +59,13 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1521
...
@@ -59,8 +59,13 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1521
product_group
:
group::product intelligence
product_group
:
group::product intelligence
time_frame
:
none
time_frame
:
none
data_source
:
database
data_source
:
database
distribution
:
[
ee
,
ce
]
distribution
:
tier
:
[
'
free'
,
'
starter'
,
'
premium'
,
'
ultimate'
,
'
bronze'
,
'
silver'
,
'
gold'
]
-
ee
-
ce
tier
:
-
free
-
premium
-
ultimate
```
```
## Create a new metric definition
## Create a new metric definition
...
...
generator_templates/usage_metric_definition/metric_definition.yml
View file @
192951b4
---
# See Usage Ping metrics dictionary docs https://docs.gitlab.com/ee/development/usage_ping/metrics_dictionary.html
# See Usage Ping metrics dictionary docs https://docs.gitlab.com/ee/development/usage_ping/metrics_dictionary.html
key_path
:
<%= key_path %>
key_path
:
<%= key_path %>
description
:
description
:
...
@@ -7,10 +8,14 @@ product_group:
...
@@ -7,10 +8,14 @@ product_group:
product_category
:
product_category
:
value_type
:
<%= value_type %>
value_type
:
<%= value_type %>
status
:
implemented
status
:
implemented
milestone
:
milestone
:
<%= milestone %>
introduced_by_url
:
introduced_by_url
:
time_frame
:
<%= time_frame %>
time_frame
:
<%= time_frame %>
data_source
:
data_source
:
distribution
:
<%= distribution %>
distribution
:
# tier: ['free', 'premium', 'ultimate']
<%= distribution %>
tier
:
# Add here corresponding tiers
# tier:
# - free
# - premium
# - ultimate
lib/generators/gitlab/usage_metric_definition_generator.rb
View file @
192951b4
...
@@ -45,9 +45,13 @@ module Gitlab
...
@@ -45,9 +45,13 @@ module Gitlab
end
end
def
distribution
def
distribution
value
=
[
'ce'
]
value
=
[
'- ce'
]
value
<<
'ee'
if
ee?
value
<<
'- ee'
if
ee?
value
value
.
join
(
"
\n
"
)
end
def
milestone
Gitlab
::
VERSION
.
match
(
'(\d+\.\d+)'
).
captures
.
first
end
end
private
private
...
...
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