From 86244967c50b2dcabdcbd15deddf35eee0e75578 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Fri, 25 Jun 2021 16:37:26 -0400 Subject: [PATCH] docs: correct some misleading telemetry docs The query metrics are actually reported for all read queries, not only ones that use a MinIndex to block for updates. Also clarify the raft.apply metric is only on the leader. --- agent/consul/rpc.go | 2 +- website/content/docs/agent/telemetry.mdx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/consul/rpc.go b/agent/consul/rpc.go index 1a8f22e3a..4c9180eef 100644 --- a/agent/consul/rpc.go +++ b/agent/consul/rpc.go @@ -56,7 +56,7 @@ var RPCCounters = []prometheus.CounterDefinition{ }, { Name: []string{"rpc", "query"}, - Help: "Increments when a server receives a new blocking RPC request, indicating the rate of new blocking query calls.", + Help: "Increments when a server receives a read request, indicating the rate of new read queries.", }, } diff --git a/website/content/docs/agent/telemetry.mdx b/website/content/docs/agent/telemetry.mdx index af50c131f..06e2b3884 100644 --- a/website/content/docs/agent/telemetry.mdx +++ b/website/content/docs/agent/telemetry.mdx @@ -69,7 +69,7 @@ These are some metrics emitted that can help you understand the health of your c | :----------------------- | :----------------------------------------------------------------------------------- | :--------------------------- | :------ | | `consul.kvs.apply` | Measures the time it takes to complete an update to the KV store. | ms | timer | | `consul.txn.apply` | Measures the time spent applying a transaction operation. | ms | timer | -| `consul.raft.apply` | Counts the number of Raft transactions occurring over the interval. | raft transactions / interval | counter | +| `consul.raft.apply` | Counts the number of Raft transactions applied during the interval. This metric is only reported on the leader. | raft transactions / interval | counter | | `consul.raft.commitTime` | Measures the time it takes to commit a new entry to the Raft log on the leader. | ms | timer | **Why they're important:** Taken together, these metrics indicate how long it takes to complete write operations in various parts of the Consul cluster. Generally these should all be fairly consistent and no more than a few milliseconds. Sudden changes in any of the timing values could be due to unexpected load on the Consul servers, or due to problems on the servers themselves. @@ -421,7 +421,7 @@ These metrics are used to monitor the health of the Consul servers. | `consul.rpc.raft_handoff` | Increments when a server accepts a Raft-related RPC connection. | connections | counter | | `consul.rpc.request_error` | Increments when a server returns an error from an RPC request. | errors | counter | | `consul.rpc.request` | Increments when a server receives a Consul-related RPC request. | requests | counter | -| `consul.rpc.query` | Increments when a server receives a new blocking RPC request, indicating the rate of new blocking query calls. See consul.rpc.queries_blocking for the current number of in-flight blocking RPC calls. This metric changed in 1.7.0 to only increment on the the start of a query. The rate of queries will appear lower, but is more accurate. | queries | counter | +| `consul.rpc.query` | Increments when a server receives a read RPC request, indicating the rate of new read queries. See consul.rpc.queries_blocking for the current number of in-flight blocking RPC calls. This metric changed in 1.7.0 to only increment on the the start of a query. The rate of queries will appear lower, but is more accurate. | queries | counter | | `consul.rpc.queries_blocking` | The current number of in-flight blocking queries the server is handling. | queries | gauge | | `consul.rpc.cross-dc` | Increments when a server sends a (potentially blocking) cross datacenter RPC query. | queries | counter | | `consul.rpc.consistentRead` | Measures the time spent confirming that a consistent read can be performed. | ms | timer |