From f4179b400d28dd707fe2ef8cbb8e7724a3b0eef2 Mon Sep 17 00:00:00 2001 From: freddygv Date: Fri, 12 Jun 2020 14:44:36 -0600 Subject: [PATCH] Update telemetry for gateway-services endpoint --- agent/catalog_endpoint.go | 2 ++ website/pages/docs/agent/telemetry.mdx | 1 + 2 files changed, 3 insertions(+) diff --git a/agent/catalog_endpoint.go b/agent/catalog_endpoint.go index 20d212010..34464a24d 100644 --- a/agent/catalog_endpoint.go +++ b/agent/catalog_endpoint.go @@ -452,5 +452,7 @@ RETRY_ONCE: } out.ConsistencyLevel = args.QueryOptions.ConsistencyLevel() + metrics.IncrCounterWithLabels([]string{"client", "api", "success", "catalog_gateway_services"}, 1, + []metrics.Label{{Name: "node", Value: s.nodeName()}}) return out.Services, nil } diff --git a/website/pages/docs/agent/telemetry.mdx b/website/pages/docs/agent/telemetry.mdx index c1e01ecc5..cd9f66920 100644 --- a/website/pages/docs/agent/telemetry.mdx +++ b/website/pages/docs/agent/telemetry.mdx @@ -165,6 +165,7 @@ This is a full list of metrics emitted by Consul. | `consul.client.api.catalog_node_services.` | This increments whenever a Consul agent receives a request to list services registered in a node. | requests | counter | | `consul.client.api.success.catalog_node_services.` | This increments whenever a Consul agent successfully responds to a request to list services in a node. | requests | counter | | `consul.client.rpc.error.catalog_node_services.` | This increments whenever a Consul agent receives an RPC error for a request to list services in a node. | errors | counter | +| `consul.client.api.catalog_gateway_services.` | This increments whenever a Consul agent receives a request to list services associated with a gateway. | requests | counter | | `consul.client.api.success.catalog_gateway_services.` | This increments whenever a Consul agent successfully responds to a request to list services associated with a gateway. | requests | counter | | `consul.client.rpc.error.catalog_gateway_services.` | This increments whenever a Consul agent receives an RPC error for a request to list services associated with a gateway. | errors | counter | | `consul.runtime.num_goroutines` | This tracks the number of running goroutines and is a general load pressure indicator. This may burst from time to time but should return to a steady state value. | number of goroutines | gauge |