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
17e96ea0
Commit
17e96ea0
authored
Jul 11, 2021
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include operational data when usage ping enabled
parent
fe1cc091
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
ee/app/services/ee/service_ping/permit_data_categories_service.rb
...ervices/ee/service_ping/permit_data_categories_service.rb
+3
-3
ee/spec/services/ee/service_ping/build_payload_service_spec.rb
...ec/services/ee/service_ping/build_payload_service_spec.rb
+1
-5
ee/spec/services/ee/service_ping/permit_data_categories_service_spec.rb
...es/ee/service_ping/permit_data_categories_service_spec.rb
+1
-1
No files found.
ee/app/services/ee/service_ping/permit_data_categories_service.rb
View file @
17e96ea0
...
...
@@ -16,11 +16,11 @@ module EE
return
[]
unless
product_intelligence_enabled?
optional_enabled
=
::
Gitlab
::
CurrentSettings
.
usage_ping_enabled?
operational
_enabled
=
::
License
.
current
.
usage_ping?
customer_service
_enabled
=
::
License
.
current
.
usage_ping?
[
STANDARD_CATEGORY
,
SUBSCRIPTION_CATEGORY
].
tap
do
|
categories
|
categories
<<
OPTIONAL_CATEGORY
if
optional_enabled
categories
<<
OPERATIONAL_CATEGORY
if
operational
_enabled
categories
<<
OP
ERATIONAL_CATEGORY
<<
OP
TIONAL_CATEGORY
if
optional_enabled
categories
<<
OPERATIONAL_CATEGORY
if
customer_service
_enabled
end
.
to_set
end
...
...
ee/spec/services/ee/service_ping/build_payload_service_spec.rb
View file @
17e96ea0
...
...
@@ -42,11 +42,7 @@ RSpec.describe ServicePing::BuildPayloadService do
end
it_behaves_like
'service ping payload with all expected metrics'
do
let
(
:expected_metrics
)
{
standard_metrics
+
subscription_metrics
+
optional_metrics
}
end
it_behaves_like
'service ping payload without restricted metrics'
do
let
(
:restricted_metrics
)
{
operational_metrics
}
let
(
:expected_metrics
)
{
standard_metrics
+
subscription_metrics
+
optional_metrics
+
operational_metrics
}
end
end
end
...
...
ee/spec/services/ee/service_ping/permit_data_categories_service_spec.rb
View file @
17e96ea0
...
...
@@ -62,7 +62,7 @@ RSpec.describe ServicePing::PermitDataCategoriesService do
end
it
'returns all categories'
do
expect
(
permitted_categories
).
to
match_array
(
%w[Standard Subscription Optional]
)
expect
(
permitted_categories
).
to
match_array
(
%w[Standard Subscription Op
erational Op
tional]
)
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