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
b1fe53a3
Commit
b1fe53a3
authored
Nov 13, 2019
by
Vitali Tatarintev
Committed by
Michael Kozono
Nov 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add usage ping metric to count alert services
parent
fb72ef07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
ee/changelogs/unreleased/usage-ping-for-alerts.yml
ee/changelogs/unreleased/usage-ping-for-alerts.yml
+5
-0
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+2
-1
ee/spec/lib/gitlab/usage_data_spec.rb
ee/spec/lib/gitlab/usage_data_spec.rb
+5
-0
No files found.
ee/changelogs/unreleased/usage-ping-for-alerts.yml
0 → 100644
View file @
b1fe53a3
---
title
:
Add a usage ping metric for number of activated Alert Services
merge_request
:
19765
author
:
type
:
added
ee/lib/ee/gitlab/usage_data.rb
View file @
b1fe53a3
...
...
@@ -137,7 +137,8 @@ module EE
projects_reporting_ci_cd_back_to_github:
count
(
::
GithubService
.
without_defaults
.
active
),
projects_with_packages:
count
(
::
Packages
::
Package
.
select
(
'distinct project_id'
)),
projects_with_prometheus_alerts:
count
(
PrometheusAlert
.
distinct_projects
),
projects_with_tracing_enabled:
count
(
ProjectTracingSetting
)
projects_with_tracing_enabled:
count
(
ProjectTracingSetting
),
projects_with_alerts_service_enabled:
count
(
AlertsService
.
active
)
},
service_desk_counts
,
security_products_usage
,
...
...
ee/spec/lib/gitlab/usage_data_spec.rb
View file @
b1fe53a3
...
...
@@ -24,6 +24,9 @@ describe Gitlab::UsageData do
create
(
:prometheus_alert
,
project:
projects
[
0
])
create
(
:prometheus_alert
,
project:
projects
[
1
])
create
(
:alerts_service
,
project:
projects
[
0
])
create
(
:alerts_service
,
:inactive
,
project:
projects
[
1
])
create
(
:package
,
project:
projects
[
0
])
create
(
:package
,
project:
projects
[
0
])
create
(
:package
,
project:
projects
[
1
])
...
...
@@ -83,6 +86,7 @@ describe Gitlab::UsageData do
projects_with_packages
projects_with_prometheus_alerts
projects_with_tracing_enabled
projects_with_alerts_service_enabled
sast_jobs
design_management_designs_create
design_management_designs_update
...
...
@@ -94,6 +98,7 @@ describe Gitlab::UsageData do
expect
(
count_data
[
:projects_with_prometheus_alerts
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_with_packages
]).
to
eq
(
2
)
expect
(
count_data
[
:feature_flags
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_with_alerts_service_enabled
]).
to
eq
(
1
)
end
it
'has integer value for epic relationship level'
do
...
...
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