Conversation
There was a problem hiding this comment.
Pull request overview
Adds Couchbase Server documentation for the /settings/appTelemetry REST API and cross-links it from Prometheus monitoring docs and navigation.
Changes:
- Adds a new REST API reference page for Application Telemetry (
/settings/appTelemetry) with GET/POST examples and parameter descriptions. - Updates Prometheus monitoring docs to mention enabling application telemetry to expose SDK/application metrics.
- Updates shared REST API curl parameter partial and adds the new page to the REST API navigation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| modules/rest-api/partials/user-pw-host-port-params.adoc | Updates the shared parameter definitions for host/port used by REST API curl examples. |
| modules/rest-api/pages/application-telemetry.adoc | New REST API reference page for application telemetry status and configuration. |
| modules/manage/pages/monitor/set-up-prometheus-for-monitoring.adoc | Adds a section describing how application telemetry affects Prometheus metrics output. |
| modules/ROOT/nav.adoc | Adds the new REST API page to the documentation navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| `host`:: | ||
| Hostname or IP address of a Couchbase Server node. | ||
|
|
||
| `PORT`:: | ||
| `port`:: | ||
| Port number for the REST API. |
There was a problem hiding this comment.
The parameter-name placeholders were changed to host/port, but many existing REST API pages still use {HOST}/{PORT} in their curl examples (for example, disk-usage-limits.adoc). This makes the shared parameter list inconsistent with the rest of the docs; consider reverting to HOST/PORT (or documenting both) and aligning placeholder casing across pages.
| [source,bash] | ||
| ---- | ||
| curl -sS -u $USER:$PASSWORD \ | ||
| -X GET 'http[s]://{host}:{port}/settings/appTelemetry' |
There was a problem hiding this comment.
This curl example uses {host}/{port} placeholders, but most REST API docs use {HOST}/{PORT}. Consider switching to the established placeholder casing (and matching whatever is documented in user-pw-host-port-params.adoc) to keep examples consistent.
| -X GET 'http[s]://{host}:{port}/settings/appTelemetry' | |
| -X GET 'http[s]://{HOST}:{PORT}/settings/appTelemetry' |
| + | ||
| * `enabled`: whether application telemetry is enabled or not. | ||
| * `maxScrapeClientsPerNode`: the maximum number of clients from which a single node can scrape telemetry data at the same time. | ||
| * `scrapeIntervalSeconds`: how often clients scrape telemetry data from the nodes, in seconds. |
There was a problem hiding this comment.
The response-field description for scrapeIntervalSeconds says "how often clients scrape telemetry data from the nodes", but earlier the page describes Couchbase Server scraping/pulling telemetry data from SDK clients. Update this description so the directionality is consistent (nodes/server scrape clients).
| * `scrapeIntervalSeconds`: how often clients scrape telemetry data from the nodes, in seconds. | |
| * `scrapeIntervalSeconds`: how often each node scrapes telemetry data from connected clients, in seconds. |
|
|
||
| [#gey-state-example] |
There was a problem hiding this comment.
Anchor ID looks like a typo: gey-state-example (missing the 't' in 'get'). If this is meant to be "get-state-example", rename it to avoid broken/unclear anchors.
| [#gey-state-example] | |
| [#get-state-example] |
| [source,bash] | ||
| ---- | ||
| curl -sS -u $USER:$PASSWORD \ | ||
| -X POST http://{host}:{port}/settings/encryptionKeys \ |
There was a problem hiding this comment.
The POST curl syntax points at /settings/encryptionKeys, but this page and the endpoint definition above describe /settings/appTelemetry. Update the example URL so it posts to the correct endpoint.
| -X POST http://{host}:{port}/settings/encryptionKeys \ | |
| -X POST http://{host}:{port}/settings/appTelemetry \ |
|
|
||
| `maxScrapeClientsPerNode` (integer, optional):: | ||
| Set the maximum number of clients from which a single node can scrape telemetry data at the same time. | ||
| If the number of client telemetry connections reaches this threshold, the node rejects new telemetry connections until the number of connect clients drops. |
There was a problem hiding this comment.
Typo in this sentence: "number of connect clients" should be "number of connected clients".
| If the number of client telemetry connections reaches this threshold, the node rejects new telemetry connections until the number of connect clients drops. | |
| If the number of client telemetry connections reaches this threshold, the node rejects new telemetry connections until the number of connected clients drops. |
| ** xref:cxx-sdk:howtos:collecting-information-and-logging.adoc#sdk-telemetry-from-the-server[C++ SDK] | ||
| ** xref:go-sdk:howtos:collecting-information-and-logging.adoc#sdk-telemetry-from-the-server[Go SDK] | ||
| ** xref:java-sdk:howtos:collecting-information-and-logging.adoc#sdk-telemetry-from-the-server[Java SDK] | ||
| ** xref:kotlin-sdk:howtos:collecting-information-and-logging.adoc#sdk-telemetry-from-the-server[Python SDK] |
There was a problem hiding this comment.
The Python SDK link uses the kotlin-sdk component in the xref target. This should likely be python-sdk (or the link text should be changed to Kotlin) to avoid a broken/misdirected cross-reference.
| ** xref:kotlin-sdk:howtos:collecting-information-and-logging.adoc#sdk-telemetry-from-the-server[Python SDK] | |
| ** xref:python-sdk:howtos:collecting-information-and-logging.adoc#sdk-telemetry-from-the-server[Python SDK] |
|
|
||
| You can enable application telemetry to have Couchbase Server collect metrics from your applications that use the Couchbase SDKs. | ||
| When you enable application telemetry, Couchbase Server collects telemetry data from your applications. | ||
| It the reports the collected data as metrics through the same Prometheus endpoint that it uses to report its own metrics. |
There was a problem hiding this comment.
Typo: "It the reports" should be "It then reports" (or similar).
| It the reports the collected data as metrics through the same Prometheus endpoint that it uses to report its own metrics. | |
| It then reports the collected data as metrics through the same Prometheus endpoint that it uses to report its own metrics. |
ingenthr
left a comment
There was a problem hiding this comment.
Nice work on this @ggray-cb . We're getting a number of questions about this functionality, so it'll be great to see it in the docs.
I had a few small comments and @shivaniguptacb may want to review. Also, it looks like copilot caught a few important things (like the kotlin/python ambiguity).
| Valid values are from `1` to `1024`. | ||
|
|
||
| + | ||
| The default value is `1024`. |
There was a problem hiding this comment.
Are there any sentinel values like 0 which indicate unlimited?
How would a user know when the limit is being hit?
@avsej or @timofey-barmin may know this off the top of their heads.
|
|
||
| * xref:manage:monitor/set-up-prometheus-for-monitoring.adoc[] | ||
|
|
||
| * See the SDK Telemetry from the Server section of the Collecting Information and Logging page in the documentation for the SDK you use. |
There was a problem hiding this comment.
Somewhere in here we should mention the SDK-API level required to get AppTelemetry from the SDK. @RichardSmedley might have a good way to communicate this.
To get details, most users will need to update both their SDK, and the cluster, and enable it. As currently written, the SDK side requirement is possibly missed.
Another requirement which we may want to mention is that this feature requires the management port to be exposed from cluster to client (typically port 8091/18091, but can be different with alt-address).
|
Nice work! |
This PR adds documentation for the Server
/settings/appTelemetryREST API endpoint.Here's a list of the changes in this PR, with links to a preview. You will need the Docs Team credentials on Confluence to access the preview.
Note: I've made some assumptions about the
maxScrapeClientsPerNodeandscrapeIntervalSecondssettings, so be sure to pay special attention to their descriptions.