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
51ca20d9
Commit
51ca20d9
authored
Jul 16, 2021
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate collected_data_categories metric
parent
a3bf2c99
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
3 deletions
+7
-3
config/metrics/settings/20210702140138_collected_data_categories.yml
...ics/settings/20210702140138_collected_data_categories.yml
+1
-0
doc/development/usage_ping/metrics_instrumentation.md
doc/development/usage_ping/metrics_instrumentation.md
+0
-1
lib/gitlab/usage/metrics/instrumentations/collected_data_categories_metric.rb
...rics/instrumentations/collected_data_categories_metric.rb
+1
-1
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-1
spec/lib/gitlab/usage_data_metrics_spec.rb
spec/lib/gitlab/usage_data_metrics_spec.rb
+4
-0
No files found.
config/metrics/settings/20210702140138_collected_data_categories.yml
View file @
51ca20d9
...
...
@@ -13,6 +13,7 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65336
time_frame
:
none
data_source
:
system
data_category
:
Standard
instrumentation_class
:
CollectedDataCategoriesMetric
distribution
:
-
ce
-
ee
...
...
doc/development/usage_ping/metrics_instrumentation.md
View file @
51ca20d9
...
...
@@ -5,6 +5,5 @@ remove_date: '2021-10-09'
This file was moved to
[
another location
](
../service_ping/metrics_instrumentation.md
)
.
<<<<<<< HEAD
<!-- This redirect file can be deleted after <2021-10-09>
. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->
lib/gitlab/usage/metrics/instrumentations/collected_data_categories_metric.rb
View file @
51ca20d9
...
...
@@ -5,7 +5,7 @@ module Gitlab
module
Metrics
module
Instrumentations
class
CollectedDataCategoriesMetric
<
GenericMetric
def
value
value
do
::
ServicePing
::
PermitDataCategoriesService
.
new
.
execute
end
end
...
...
lib/gitlab/usage_data.rb
View file @
51ca20d9
...
...
@@ -257,7 +257,7 @@ module Gitlab
ldap_encrypted_secrets_enabled:
alt_usage_data
(
fallback:
nil
)
{
Gitlab
::
Auth
::
Ldap
::
Config
.
encrypted_secrets
.
active?
},
operating_system:
alt_usage_data
(
fallback:
nil
)
{
operating_system
},
gitaly_apdex:
alt_usage_data
{
gitaly_apdex
},
collected_data_categories:
a
lt_usage_data
(
fallback:
[])
{
Gitlab
::
Usage
::
Metrics
::
Instrumentations
::
CollectedDataCategoriesMetric
.
new
(
time_frame:
'none'
).
value
}
collected_data_categories:
a
dd_metric
(
Gitlab
::
Usage
::
Metrics
::
Instrumentations
::
CollectedDataCategoriesMetric
.
new
(
time_frame:
'none'
))
}
}
end
...
...
spec/lib/gitlab/usage_data_metrics_spec.rb
View file @
51ca20d9
...
...
@@ -42,6 +42,10 @@ RSpec.describe Gitlab::UsageDataMetrics do
it
'includes usage_activity_by_stage_monthly keys'
do
expect
(
subject
[
:usage_activity_by_stage_monthly
][
:plan
]).
to
include
(
:issues
)
end
it
'includes settings keys'
do
expect
(
subject
[
:settings
]).
to
include
(
:collected_data_categories
)
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