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
d4e37765
Commit
d4e37765
authored
Aug 27, 2020
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add kubernetes_agents usage metric
This currently is a total count of agents. More detailed metrics to come
parent
f91bef1c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
0 deletions
+10
-0
changelogs/unreleased/usage_ping_kubernetes_agent.yml
changelogs/unreleased/usage_ping_kubernetes_agent.yml
+5
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-0
spec/factories/usage_data.rb
spec/factories/usage_data.rb
+3
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+1
-0
No files found.
changelogs/unreleased/usage_ping_kubernetes_agent.yml
0 → 100644
View file @
d4e37765
---
title
:
Add kubernetes_agents usage metric
merge_request
:
40559
author
:
type
:
other
lib/gitlab/usage_data.rb
View file @
d4e37765
...
...
@@ -110,6 +110,7 @@ module Gitlab
clusters_applications_jupyter:
count
(
::
Clusters
::
Applications
::
Jupyter
.
available
),
clusters_applications_cilium:
count
(
::
Clusters
::
Applications
::
Cilium
.
available
),
clusters_management_project:
count
(
::
Clusters
::
Cluster
.
with_management_project
),
kubernetes_agents:
count
(
::
Clusters
::
Agent
),
in_review_folder:
count
(
::
Environment
.
in_review_folder
),
grafana_integrated_projects:
count
(
GrafanaIntegration
.
enabled
),
groups:
count
(
Group
),
...
...
spec/factories/usage_data.rb
View file @
d4e37765
...
...
@@ -65,6 +65,9 @@ FactoryBot.define do
create
(
:alert_management_alert
,
issue:
alert_bot_issues
[
0
],
project:
projects
[
0
])
create
(
:self_managed_prometheus_alert_event
,
related_issues:
[
issues
[
1
]],
project:
projects
[
0
])
# Kubernetes agents
create
(
:cluster_agent
,
project:
projects
[
0
])
# Enabled clusters
gcp_cluster
=
create
(
:cluster_provider_gcp
,
:created
).
cluster
create
(
:cluster_provider_aws
,
:created
)
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
d4e37765
...
...
@@ -408,6 +408,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect
(
count_data
[
:clusters_applications_jupyter
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_cilium
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_management_project
]).
to
eq
(
1
)
expect
(
count_data
[
:kubernetes_agents
]).
to
eq
(
1
)
expect
(
count_data
[
:deployments
]).
to
eq
(
4
)
expect
(
count_data
[
:successful_deployments
]).
to
eq
(
2
)
...
...
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