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
6de618f7
Commit
6de618f7
authored
Jun 30, 2020
by
Mike Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve metrics-related steps in Geo framework doc
parent
8c5ecfa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
18 deletions
+40
-18
doc/development/geo/framework.md
doc/development/geo/framework.md
+40
-18
No files found.
doc/development/geo/framework.md
View file @
6de618f7
...
...
@@ -385,36 +385,58 @@ Widgets should now be replicated by Geo!
end
```
1.
Add fields
`widget_count`
,
`widget_checksummed_count`
,
`widget_checksum_failed_count`
,
`widget_synced_count`
and
`widget_failed_count`
to
`GeoNodeStatus#RESOURCE_STATUS_FIELDS`
array in
`ee/app/models/geo_node_status.rb`
.
To do: Add verification on secondaries. This should be done as part of
[
Geo: Self Service Framework - First Implementation for Package File verification
](
https://gitlab.com/groups/gitlab-org/-/epics/1817
)
Widgets should now be verified by Geo!
#### Metrics
Metrics are gathered by
`Geo::MetricsUpdateWorker`
, persisted in
`GeoNodeStatus`
for display in the UI, and sent to Prometheus.
1.
Add fields
`widget_count`
,
`widget_checksummed_count`
,
`widget_checksum_failed_count`
,
`widget_synced_count`
,
`widget_failed_count`
, and
`widget_registry_count`
to
`GeoNodeStatus#RESOURCE_STATUS_FIELDS`
array in
`ee/app/models/geo_node_status.rb`
.
1.
Add the same fields to
`GeoNodeStatus#PROMETHEUS_METRICS`
hash in
`ee/app/models/geo_node_status.rb`
.
1.
Add the same fields to
`Sidekiq metrics`
table in
`doc/administration/monitoring/prometheus/gitlab_metrics.md`
.
1.
Add the same fields to
`GET /geo_nodes/status`
example response in
`doc/api/geo_nodes.md`
.
1.
Modify
`GeoNodeStatus#load_verification_data`
to make sure the fields mantioned above
are set:
1.
Add the same fields to
`GET /geo_nodes/status`
example response in
`doc/api/geo_nodes.md`
.
1.
Add the same fields to
`ee/spec/models/geo_node_status_spec.rb`
and
`ee/spec/factories/geo_node_statuses.rb`
.
1.
Set
`widget_count`
in
`GeoNodeStatus#load_data_from_current_node`
:
```
ruby
self
.
widget_count
=
Geo
::
WidgetReplicator
.
model
.
count
self
.
widget_checksummed_count
=
Geo
::
WidgetReplicator
.
checksummed
.
count
self
.
widget_checksum_failed_count
=
Geo
::
WidgetReplicator
.
checksum_failed
.
count
self
.
widget_count
=
Geo
::
WidgetReplicator
.
primary_total_count
```
1.
Add
`GeoNodeStatus#load_widgets_data`
to set
`widget_synced_count`
,
`widget_failed_count`
, and
`widget_registry_count`
:
```
ruby
def
load_widget_data
self
.
widget_synced_count
=
Geo
::
WidgetReplicator
.
synced_count
self
.
widget_failed_count
=
Geo
::
WidgetReplicator
.
failed_count
self
.
widget_registry_count
=
Geo
::
WidgetReplicator
.
registry_count
end
```
1.
Make sure
`Widget`
model has
`checksummed`
and
`checksum_failed`
scopes.
1.
Update
`ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json`
with new fields.
1.
Update
`GeoNodeStatus#PROMETHEUS_METRICS`
hash in
`ee/app/models/geo_node_status.rb`
with new fields.
1.
Update
`Sidekiq metrics`
table in
`doc/administration/monitoring/prometheus/gitlab_metrics.md`
with new fields.
1.
Update
`GET /geo_nodes/status`
example response in
`doc/api/geo_nodes.md`
with new fields.
1.
Update
`ee/spec/models/geo_node_status_spec.rb`
and
`ee/spec/factories/geo_node_statuses.rb`
with new fields.
1.
Call
`GeoNodeStatus#load_widgets_data`
in
`GeoNodeStatus#load_secondary_data`
.
To do: Add verification on secondaries. This should be done as part of
[
Geo: Self Service Framework - First Implementation for Package File verification
](
https://gitlab.com/groups/gitlab-org/-/epics/1817
)
1.
Set
`widget_checksummed_count`
and
`widget_checksum_failed_count`
in
`GeoNodeStatus#load_verification_data`
:
Widgets should now be verified by Geo!
```
ruby
self
.
widget_checksummed_count
=
Geo
::
WidgetReplicator
.
checksummed_count
self
.
widget_checksum_failed_count
=
Geo
::
WidgetReplicator
.
checksum_failed_count
```
Widget replication and verification metrics should now be available in the API,
the Admin Area UI, and Prometheus!
#### GraphQL API
...
...
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