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
921850a0
Commit
921850a0
authored
Jul 17, 2020
by
João Pereira
Committed by
Stan Hu
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add container registry observations to usage ping
parent
30c1d8c9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
0 deletions
+18
-0
changelogs/unreleased/199193-track-total-number-of-instances-using-an-external-container-regist.yml
...umber-of-instances-using-an-external-container-regist.yml
+5
-0
doc/development/telemetry/usage_ping.md
doc/development/telemetry/usage_ping.md
+6
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+4
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+3
-0
No files found.
changelogs/unreleased/199193-track-total-number-of-instances-using-an-external-container-regist.yml
0 → 100644
View file @
921850a0
---
title
:
Add container registry observations to usage ping
merge_request
:
37203
author
:
type
:
added
doc/development/telemetry/usage_ping.md
View file @
921850a0
...
@@ -737,6 +737,8 @@ appear to be associated to any of the services running, since they all appear to
...
@@ -737,6 +737,8 @@ appear to be associated to any of the services running, since they all appear to
|
`server`
|
`topology > nodes > node_services`
|
`enablement`
| | | The type of web server used (Unicorn or Puma) |
|
`server`
|
`topology > nodes > node_services`
|
`enablement`
| | | The type of web server used (Unicorn or Puma) |
|
`network_policy_forwards`
|
`counts`
|
`defend`
| | EE | Cumulative count of forwarded packets by Container Network |
|
`network_policy_forwards`
|
`counts`
|
`defend`
| | EE | Cumulative count of forwarded packets by Container Network |
|
`network_policy_drops`
|
`counts`
|
`defend`
| | EE | Cumulative count of dropped packets by Container Network |
|
`network_policy_drops`
|
`counts`
|
`defend`
| | EE | Cumulative count of dropped packets by Container Network |
|
`vendor`
|
`container_registry`
|
`package`
| | CE+EE | The Container Registry vendor (GitLab or third-party) |
|
`version`
|
`container_registry`
|
`package`
| | CE+EE | The Container Registry version (only when vendor is GitLab) |
## Example Usage Ping payload
## Example Usage Ping payload
...
@@ -811,6 +813,10 @@ The following is example content of the Usage Ping payload.
...
@@ -811,6 +813,10 @@ The following is example content of the Usage Ping payload.
"enabled"
:
true
,
"enabled"
:
true
,
"version"
:
"1.17.0"
"version"
:
"1.17.0"
},
},
"container_registry"
:
{
"vendor"
:
"gitlab"
,
"version"
:
"2.9.1-gitlab"
},
"database"
:
{
"database"
:
{
"adapter"
:
"postgresql"
,
"adapter"
:
"postgresql"
,
"version"
:
"9.6.15"
"version"
:
"9.6.15"
...
...
lib/gitlab/usage_data.rb
View file @
921850a0
...
@@ -254,6 +254,10 @@ module Gitlab
...
@@ -254,6 +254,10 @@ module Gitlab
enabled:
alt_usage_data
(
fallback:
nil
)
{
Gitlab
.
config
.
pages
.
enabled
},
enabled:
alt_usage_data
(
fallback:
nil
)
{
Gitlab
.
config
.
pages
.
enabled
},
version:
alt_usage_data
{
Gitlab
::
Pages
::
VERSION
}
version:
alt_usage_data
{
Gitlab
::
Pages
::
VERSION
}
},
},
container_registry:
{
vendor:
alt_usage_data
(
fallback:
nil
)
{
Gitlab
::
CurrentSettings
.
container_registry_vendor
},
version:
alt_usage_data
(
fallback:
nil
)
{
Gitlab
::
CurrentSettings
.
container_registry_version
}
},
database:
{
database:
{
adapter:
alt_usage_data
{
Gitlab
::
Database
.
adapter_name
},
adapter:
alt_usage_data
{
Gitlab
::
Database
.
adapter_name
},
version:
alt_usage_data
{
Gitlab
::
Database
.
version
}
version:
alt_usage_data
{
Gitlab
::
Database
.
version
}
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
921850a0
...
@@ -575,6 +575,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
...
@@ -575,6 +575,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
it
'gathers basic components usage data'
do
it
'gathers basic components usage data'
do
stub_runtime
(
:puma
)
stub_runtime
(
:puma
)
stub_application_setting
(
container_registry_vendor:
'gitlab'
,
container_registry_version:
'x.y.z'
)
expect
(
subject
[
:app_server
][
:type
]).
to
eq
(
'puma'
)
expect
(
subject
[
:app_server
][
:type
]).
to
eq
(
'puma'
)
expect
(
subject
[
:gitlab_pages
][
:enabled
]).
to
eq
(
Gitlab
.
config
.
pages
.
enabled
)
expect
(
subject
[
:gitlab_pages
][
:enabled
]).
to
eq
(
Gitlab
.
config
.
pages
.
enabled
)
...
@@ -587,6 +588,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
...
@@ -587,6 +588,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect
(
subject
[
:gitaly
][
:clusters
]).
to
be
>=
0
expect
(
subject
[
:gitaly
][
:clusters
]).
to
be
>=
0
expect
(
subject
[
:gitaly
][
:filesystems
]).
to
be_an
(
Array
)
expect
(
subject
[
:gitaly
][
:filesystems
]).
to
be_an
(
Array
)
expect
(
subject
[
:gitaly
][
:filesystems
].
first
).
to
be_a
(
String
)
expect
(
subject
[
:gitaly
][
:filesystems
].
first
).
to
be_a
(
String
)
expect
(
subject
[
:container_registry
][
:vendor
]).
to
eq
(
'gitlab'
)
expect
(
subject
[
:container_registry
][
:version
]).
to
eq
(
'x.y.z'
)
end
end
def
stub_runtime
(
runtime
)
def
stub_runtime
(
runtime
)
...
...
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