Skip to content

Commit df18184

Browse files
committed
CBG-4312 improve metrics documentation
- remove /_metrics endpoint, which does not need public API documentation, as it never should have been implemented - change copy to match public docs for description - add links to upstream files
1 parent 0efa2a4 commit df18184

File tree

6 files changed

+39
-23
lines changed

6 files changed

+39
-23
lines changed

docs/api/admin.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88

99
openapi: 3.0.3
1010
info:
11-
title: Sync Gateway
12-
description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server
11+
title: Sync Gateway Admin REST API
12+
description: |-
13+
# Introduction
14+
15+
The Sync Gateway Admin REST API is used to administer user accounts and roles, and to run administrative tasks in superuser mode.
1316
version: '3.3'
1417
license:
1518
name: Business Source License 1.1 (BSL)
@@ -207,5 +210,5 @@ tags:
207210
- name: Unsupported
208211
description: Endpoints that are not supported by Sync Gateway
209212
externalDocs:
210-
description: Sync Gateway Quickstart | Couchbase Docs
211-
url: 'https://docs.couchbase.com/sync-gateway/current/index.html'
213+
description: ⬆️ Admin REST API Overview
214+
url: rest-api-admin.html

docs/api/components/schemas.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ ExpVars:
166166
description: "The total uptime."
167167
per_db:
168168
description: |-
169-
This array contains stats for all databases declared in the config file -- see the [Sync Gateway Statistics Schema](./../stats-monitoring.html) for more details on the metrics collected and reported by Sync Gateway.
170-
The statistics for each {$db_name} database are grouped into:
169+
This array contains stats for all databases declared in the config file — see [View Statistics and Metrics](stats-monitoring.html) for more details on the metrics collected and reported by Sync Gateway.
170+
171+
The statistics for each database are grouped into:
171172
- cache related statistics
172173
- collections statistics
173174
- cbl_replication_push

docs/api/metric.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88

99
openapi: 3.0.3
1010
info:
11-
title: Sync Gateway
12-
description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server
11+
title: Sync Gateway Metrics REST API
12+
description: |-
13+
# Introduction
14+
15+
Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server.
16+
The Sync Gateway Metrics REST API returns Sync Gateway metrics, in JSON or Prometheus-compatible formats, for performance monitoring and diagnostic purposes.
1317
version: '3.3'
1418
license:
1519
name: Business Source License 1.1 (BSL)
@@ -30,15 +34,17 @@ servers:
3034
paths:
3135
/_ping:
3236
$ref: ./paths/common/_ping.yaml
33-
/_metrics:
34-
$ref: ./paths/metric/metrics.yaml
3537
/metrics:
3638
$ref: ./paths/metric/metrics.yaml
3739
/_expvar:
3840
$ref: ./paths/metric/_expvar.yaml
3941
tags:
4042
- name: Prometheus
4143
description: Endpoints for use with Prometheus
44+
- name: JSON
45+
description: Endpoints for use with JSON metrics
46+
- name: Server
47+
description: Endpoints for managing the REST API
4248
externalDocs:
43-
description: Sync Gateway Quickstart | Couchbase Docs
44-
url: 'https://docs.couchbase.com/sync-gateway/current/index.html'
49+
description: ⬆️ Metrics REST API Overview
50+
url: rest-api-metrics.html

docs/api/paths/metric/_expvar.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# software will be governed by the Apache License, Version 2.0, included in
88
# the file licenses/APL2.txt.
99
get:
10-
summary: Get all Sync Gateway statistics
10+
summary: Get all Sync Gateway statistics in JSON format
1111
description: |-
1212
This returns a snapshot of all metrics in Sync Gateway for debugging and monitoring purposes.
1313
@@ -18,9 +18,13 @@ get:
1818
* Sync Gateway Architect
1919
* Sync Gateway Dev Ops
2020
* External Stats Reader
21+
tags:
22+
- JSON
2123
responses:
2224
'200':
23-
description: Returned statistics
25+
description: |-
26+
Successfully returned statistics.
27+
For details, see [JSON Metrics](stats-monitoring-json.html).
2428
content:
2529
application/javascript:
2630
schema:

docs/api/paths/metric/metrics.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ get:
1717
* External Stats Reader
1818
responses:
1919
'200':
20-
description: Successfully returned stats
21-
content:
22-
text/plain:
23-
schema:
24-
type: string
20+
description: |-
21+
Successfully returned statistics.
22+
For details, see [Prometheus Metrics](stats-monitoring-prometheus.html).
2523
tags:
2624
- Prometheus
2725
operationId: get_metrics

docs/api/public.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88

99
openapi: 3.0.3
1010
info:
11-
title: Sync Gateway
12-
description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server
11+
title: Sync Gateway Public REST API
12+
description: |-
13+
# Introduction
14+
15+
Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server.
16+
The Sync Gateway Public REST API is used for client replication.
1317
version: '3.3'
1418
license:
1519
name: Business Source License 1.1 (BSL)
@@ -108,5 +112,5 @@ tags:
108112
description: Endpoints that are not supported by Sync Gateway
109113
x-capella: false
110114
externalDocs:
111-
description: Sync Gateway Quickstart | Couchbase Docs
112-
url: 'https://docs.couchbase.com/sync-gateway/current/index.html'
115+
description: ⬆️ Public REST API Overview
116+
url: rest-api.html

0 commit comments

Comments
 (0)