From 024715eb11acd4cbabc8f1b767bd046f81c9986d Mon Sep 17 00:00:00 2001 From: Connor Kelly Date: Tue, 5 Oct 2021 13:34:24 -0500 Subject: [PATCH] Add changelog, website and metric docs Add changelog to document what changed. Add entry to telemetry section of the website to document what changed Add docs to the usagemetric endpoint to help document the metrics in code --- .changelog/11222.txt | 3 +++ agent/consul/usagemetrics/usagemetrics.go | 8 ++++++++ website/content/docs/agent/telemetry.mdx | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 .changelog/11222.txt diff --git a/.changelog/11222.txt b/.changelog/11222.txt new file mode 100644 index 0000000000..b87ddf8ea3 --- /dev/null +++ b/.changelog/11222.txt @@ -0,0 +1,3 @@ +```release-note:improvement +telemetry: Add new metrics for the count of connect service instances and configuration entries. +``` diff --git a/agent/consul/usagemetrics/usagemetrics.go b/agent/consul/usagemetrics/usagemetrics.go index c767758246..cba1a0fa0d 100644 --- a/agent/consul/usagemetrics/usagemetrics.go +++ b/agent/consul/usagemetrics/usagemetrics.go @@ -40,6 +40,14 @@ var Gauges = []prometheus.GaugeDefinition{ Name: []string{"consul", "kv", "entries"}, Help: "Measures the current number of server agents registered with Consul. It is only emitted by Consul servers. Added in v1.10.3.", }, + { + Name: []string{"consul", "state", "connect_instances"}, + Help: "Measures the current number of unique connect service instances registered with Consul, labeled by Kind. It is only emitted by Consul servers. Added in v1.10.4.", + }, + { + Name: []string{"consul", "state", "config_entries"}, + Help: "Measures the current number of unique configuration entries registered with Consul, labeled by Kind. It is only emitted by Consul servers. Added in v1.10.4.", + }, } type getMembersFunc func() []serf.Member diff --git a/website/content/docs/agent/telemetry.mdx b/website/content/docs/agent/telemetry.mdx index 2902d43553..9518eb60d1 100644 --- a/website/content/docs/agent/telemetry.mdx +++ b/website/content/docs/agent/telemetry.mdx @@ -314,6 +314,8 @@ This is a full list of metrics emitted by Consul. | `consul.state.services` | Measures the current number of unique services registered with Consul, based on service name. It is only emitted by Consul servers. Added in v1.9.0. | number of objects | gauge | | `consul.state.service_instances` | Measures the current number of unique service instances registered with Consul. It is only emitted by Consul servers. Added in v1.9.0. | number of objects | gauge | | `consul.state.kv_entries` | Measures the current number of unique KV entries written in Consul. It is only emitted by Consul servers. Added in v1.10.3. | number of objects | gauge | +| `consul.state.connect_instances` | Measures the current number of unique connect service instances registered with Consul labeled by Kind (e.g. connect-proxy, connect-native, etc). Added in v1.10.4 | number of objects | gauge | +| `consul.state.config_entries` | Measures the current number of configuration entries registered with Consul labeled by Kind (e.g. service-defaults, proxy-defaults, etc). See [Configuration Entries](/docs/connect/config-entries) for more information. Added in v1.10.4 | number of objects | gauge | | `consul.members.clients` | Measures the current number of client agents registered with Consul. It is only emitted by Consul servers. Added in v1.9.6. | number of clients | gauge | | `consul.members.servers` | Measures the current number of server agents registered with Consul. It is only emitted by Consul servers. Added in v1.9.6. | number of servers | gauge | | `consul.dns.stale_queries` | Increments when an agent serves a query within the allowed stale threshold. | queries | counter |