-
Notifications
You must be signed in to change notification settings - Fork 183
DOC-13717 rest api for app telemetry #4088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/8.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,222 @@ | ||||||||
| = Application Telemetry | ||||||||
| :description: pass:q[You can enable application telemetry that lets Couchbase Server periodically collect information from your clients that use the Couchbase SDK.] | ||||||||
| :page-topic-type: reference | ||||||||
| :page-toclevels: 3 | ||||||||
|
|
||||||||
| [abstract] | ||||||||
| {description} | ||||||||
|
|
||||||||
| == Description | ||||||||
|
|
||||||||
| Having Couchbase Server collect telemetry information from your applications that use the Couchbase SDKs can help you troubleshoot client issues. | ||||||||
| This telemetry data is useful to diagnose issues such as poor performance or timeouts. | ||||||||
|
|
||||||||
| When you enable application telemetry, Couchbase Server advertises to SDK clients that it can collect telemetry data. | ||||||||
| When an SDK client connects to a cluster with application telemetry enabled, it opens a WebSocket connection to a node in the cluster. | ||||||||
| Couchbase Server uses this connection to periodically gather telemetry data from the client in Prometheus format. | ||||||||
|
|
||||||||
| Couchbase Server reports the collected telemetry data through the same Prometheus metrics endpoint it uses to publish its own metrics. | ||||||||
| See xref:manage:monitor/set-up-prometheus-for-monitoring.adoc[] to learn how to set up Prometheus to collect metrics from your Couchbase Server cluster. | ||||||||
|
|
||||||||
| NOTE: A Couchbase Server cluster only supports application telemetry when all of its nodes are running version 8.0 or later. | ||||||||
| Earlier versions of Couchbase Server do not support application telemetry. | ||||||||
| You cannot have the cluster collect application telemetry if the cluster is running in mixed mode with some nodes running a version earlier than 8.0. | ||||||||
| If you enable application telemetry on a cluster running in mixed mode with pre-8.0 nodes, the cluster does not advertise its ability to collect telemetry to clients. | ||||||||
|
|
||||||||
| == HTTP Methods | ||||||||
|
|
||||||||
| This API endpoint supports the following methods: | ||||||||
|
|
||||||||
| * <<#get-status>> | ||||||||
| * <<#configure-telemetry>> | ||||||||
|
|
||||||||
|
|
||||||||
| [#get-status] | ||||||||
| == Get Application Telemetry Status | ||||||||
|
|
||||||||
| The following method gets the current state of application telemetry for the cluster. | ||||||||
|
|
||||||||
| ---- | ||||||||
| GET /settings/appTelemetry | ||||||||
| ---- | ||||||||
|
|
||||||||
| === curl Syntax | ||||||||
|
|
||||||||
| [source,bash] | ||||||||
| ---- | ||||||||
| curl -sS -u $USER:$PASSWORD \ | ||||||||
| -X GET 'http[s]://{host}:{port}/settings/appTelemetry' | ||||||||
|
||||||||
| -X GET 'http[s]://{host}:{port}/settings/appTelemetry' | |
| -X GET 'http[s]://{HOST}:{PORT}/settings/appTelemetry' |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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] |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 \ |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,9 @@ The name of a user who has one of the roles listed in <<{priv-link}>>. | |
| `PASSWORD`:: | ||
| The password for the `user`. | ||
|
|
||
| `HOST`:: | ||
| Hostname or IP address of a Couchbase Server. | ||
| `host`:: | ||
| Hostname or IP address of a Couchbase Server node. | ||
|
|
||
| `PORT`:: | ||
| `port`:: | ||
| Port number for the REST API. | ||
|
Comment on lines
+8
to
12
|
||
| Defaults are 8091 for unencrypted and 18901 for encrypted connections. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "It the reports" should be "It then reports" (or similar).