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
0cd7ebf7
Commit
0cd7ebf7
authored
Mar 25, 2019
by
Logan King
Committed by
Dmitriy Zaporozhets
Mar 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error tracking usage counts
parent
66115fee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
changelogs/unreleased/ce-56153-error-tracking-counts.yml
changelogs/unreleased/ce-56153-error-tracking-counts.yml
+5
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+4
-0
No files found.
changelogs/unreleased/ce-56153-error-tracking-counts.yml
0 → 100644
View file @
0cd7ebf7
---
title
:
Add usage counts for error tracking feature
merge_request
:
25472
author
:
type
:
added
lib/gitlab/usage_data.rb
View file @
0cd7ebf7
...
@@ -84,6 +84,7 @@ module Gitlab
...
@@ -84,6 +84,7 @@ module Gitlab
projects:
count
(
Project
),
projects:
count
(
Project
),
projects_imported_from_github:
count
(
Project
.
where
(
import_type:
'github'
)),
projects_imported_from_github:
count
(
Project
.
where
(
import_type:
'github'
)),
projects_with_repositories_enabled:
count
(
ProjectFeature
.
where
(
'repository_access_level > ?'
,
ProjectFeature
::
DISABLED
)),
projects_with_repositories_enabled:
count
(
ProjectFeature
.
where
(
'repository_access_level > ?'
,
ProjectFeature
::
DISABLED
)),
projects_with_error_tracking_enabled:
count
(
::
ErrorTracking
::
ProjectErrorTrackingSetting
.
where
(
enabled:
true
)),
protected_branches:
count
(
ProtectedBranch
),
protected_branches:
count
(
ProtectedBranch
),
releases:
count
(
Release
),
releases:
count
(
Release
),
remote_mirrors:
count
(
RemoteMirror
),
remote_mirrors:
count
(
RemoteMirror
),
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
0cd7ebf7
...
@@ -13,6 +13,8 @@ describe Gitlab::UsageData do
...
@@ -13,6 +13,8 @@ describe Gitlab::UsageData do
create
(
:service
,
project:
projects
[
0
],
type:
'SlackSlashCommandsService'
,
active:
true
)
create
(
:service
,
project:
projects
[
0
],
type:
'SlackSlashCommandsService'
,
active:
true
)
create
(
:service
,
project:
projects
[
1
],
type:
'SlackService'
,
active:
true
)
create
(
:service
,
project:
projects
[
1
],
type:
'SlackService'
,
active:
true
)
create
(
:service
,
project:
projects
[
2
],
type:
'SlackService'
,
active:
true
)
create
(
:service
,
project:
projects
[
2
],
type:
'SlackService'
,
active:
true
)
create
(
:project_error_tracking_setting
,
project:
projects
[
0
])
create
(
:project_error_tracking_setting
,
project:
projects
[
1
],
enabled:
false
)
gcp_cluster
=
create
(
:cluster
,
:provided_by_gcp
)
gcp_cluster
=
create
(
:cluster
,
:provided_by_gcp
)
create
(
:cluster
,
:provided_by_user
)
create
(
:cluster
,
:provided_by_user
)
...
@@ -117,6 +119,7 @@ describe Gitlab::UsageData do
...
@@ -117,6 +119,7 @@ describe Gitlab::UsageData do
projects_slack_slash_active
projects_slack_slash_active
projects_prometheus_active
projects_prometheus_active
projects_with_repositories_enabled
projects_with_repositories_enabled
projects_with_error_tracking_enabled
pages_domains
pages_domains
protected_branches
protected_branches
releases
releases
...
@@ -146,6 +149,7 @@ describe Gitlab::UsageData do
...
@@ -146,6 +149,7 @@ describe Gitlab::UsageData do
expect
(
count_data
[
:projects_slack_notifications_active
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_slack_notifications_active
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_slack_slash_active
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_slack_slash_active
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_with_repositories_enabled
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_with_repositories_enabled
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_with_error_tracking_enabled
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_enabled
]).
to
eq
(
7
)
expect
(
count_data
[
:clusters_enabled
]).
to
eq
(
7
)
expect
(
count_data
[
:project_clusters_enabled
]).
to
eq
(
6
)
expect
(
count_data
[
:project_clusters_enabled
]).
to
eq
(
6
)
...
...
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