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
22cb3987
Commit
22cb3987
authored
Oct 19, 2021
by
Nikolay Belokolodov
Committed by
Igor Drozdov
Oct 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add licensee metrics (EE)
parent
8f73123e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
50 deletions
+63
-50
ee/config/metrics/license/20210204124839_email.yml
ee/config/metrics/license/20210204124839_email.yml
+0
-20
ee/config/metrics/license/20210204124841_company.yml
ee/config/metrics/license/20210204124841_company.yml
+0
-20
ee/config/metrics/license/20211012125843_licensee_metrics.yml
...onfig/metrics/license/20211012125843_licensee_metrics.yml
+11
-9
ee/config/metrics/object_schemas/licensee.json
ee/config/metrics/object_schemas/licensee.json
+17
-0
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+1
-1
ee/lib/gitlab/usage/metrics/instrumentations/licensee_metrics.rb
...gitlab/usage/metrics/instrumentations/licensee_metrics.rb
+19
-0
ee/spec/lib/ee/gitlab/usage/metrics/instrumentations/licensee_metrics_spec.rb
...b/usage/metrics/instrumentations/licensee_metrics_spec.rb
+15
-0
No files found.
ee/config/metrics/license/20210204124839_email.yml
deleted
100644 → 0
View file @
8f73123e
---
key_path
:
licensee.Email
description
:
Email on the GitLab license
product_section
:
fulfillment
product_stage
:
fulfillment
product_group
:
group::license
product_category
:
license
value_type
:
string
status
:
active
time_frame
:
none
data_source
:
license
data_category
:
subscription
distribution
:
-
ee
tier
:
-
premium
-
ultimate
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/557
performance_indicator_type
:
[]
milestone
:
"
<13.9"
ee/config/metrics/license/20210204124841_company.yml
deleted
100644 → 0
View file @
8f73123e
---
key_path
:
licensee.Company
description
:
Company on the GitLab license
product_section
:
fulfillment
product_stage
:
fulfillment
product_group
:
group::license
product_category
:
license
value_type
:
string
status
:
active
time_frame
:
none
data_source
:
license
data_category
:
subscription
distribution
:
-
ee
tier
:
-
premium
-
ultimate
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/557
performance_indicator_type
:
[]
milestone
:
"
<13.9"
ee/config/metrics/license/2021
0204124837_name
.yml
→
ee/config/metrics/license/2021
1012125843_licensee_metrics
.yml
View file @
22cb3987
---
key_path
:
licensee
.Name
description
:
Name on the GitLab license
key_path
:
licensee
description
:
Licensee Information
product_section
:
fulfillment
product_stage
:
fulfillment
product_group
:
group::license
product_category
:
license
value_type
:
string
value_type
:
object
instrumentation_class
:
LicenseeMetrics
status
:
active
time_frame
:
none
milestone
:
"
14.4"
introduced_by_url
:
data_source
:
license
time_frame
:
none
data_category
:
subscription
distribution
:
-
ee
-
ee
tier
:
-
premium
-
ultimate
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/557
-
premium
-
ultimate
performance_indicator_type
:
[]
milestone
:
"
<13.9
"
value_json_schema
:
"
ee/config/metrics/object_schemas/licensee.json
"
ee/config/metrics/object_schemas/licensee.json
0 → 100644
View file @
22cb3987
{
"type"
:
"object"
,
"properties"
:
{
"Name"
:
{
"type"
:
"string"
,
"description"
:
"Name on the GitLab license"
},
"Email"
:
{
"type"
:
"string"
,
"description"
:
"Email on the GitLab license"
},
"Company"
:
{
"type"
:
"string"
,
"description"
:
"Company on the GitLab license"
}
}
}
ee/lib/ee/gitlab/usage_data.rb
View file @
22cb3987
...
...
@@ -95,7 +95,7 @@ module EE
# rubocop: disable UsageData/LargeTable
usage_data
[
:historical_max_users
]
=
license
.
historical_max
# rubocop: enable UsageData/LargeTable
usage_data
[
:licensee
]
=
license
.
licensee
usage_data
[
:licensee
]
=
add_metric
(
"LicenseeMetrics"
)
usage_data
[
:license_user_count
]
=
license
.
restricted_user_count
usage_data
[
:license_billable_users
]
=
alt_usage_data
{
license
.
daily_billable_users_count
}
usage_data
[
:license_starts_at
]
=
license
.
starts_at
...
...
ee/lib/gitlab/usage/metrics/instrumentations/licensee_metrics.rb
0 → 100644
View file @
22cb3987
# frozen_string_literal: true
module
Gitlab
module
Usage
module
Metrics
module
Instrumentations
class
LicenseeMetrics
<
::
Gitlab
::
Usage
::
Metrics
::
Instrumentations
::
GenericMetric
value
do
{
"Name"
=>
::
License
.
current
.
licensee_name
,
"Company"
=>
::
License
.
current
.
licensee_company
,
"Email"
=>
::
License
.
current
.
licensee_email
}
end
end
end
end
end
end
ee/spec/lib/ee/gitlab/usage/metrics/instrumentations/licensee_metrics_spec.rb
0 → 100644
View file @
22cb3987
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Usage
::
Metrics
::
Instrumentations
::
LicenseeMetrics
do
let
(
:expected_value
)
do
{
"Name"
=>
::
License
.
current
.
licensee_name
,
"Company"
=>
::
License
.
current
.
licensee_company
,
"Email"
=>
::
License
.
current
.
licensee_email
}
end
it_behaves_like
'a correct instrumented metric value'
,
{
time_frame:
'none'
}
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