From 07bc22e405d1a0fcc5f320c763135ad1eacd17f0 Mon Sep 17 00:00:00 2001 From: alex <8968914+acpana@users.noreply.github.com> Date: Wed, 29 Jun 2022 09:46:37 -0700 Subject: [PATCH] no 1.9 style metrics (#13532) Signed-off-by: acpana <8968914+acpana@users.noreply.github.com> --- .changelog/13532.txt | 3 + agent/agent.go | 12 -- agent/config/builder.go | 1 - agent/config/config.go | 1 - agent/config/runtime_test.go | 1 - .../TestRuntimeConfig_Sanitize.golden | 1 - agent/config/testdata/full-config.hcl | 1 - agent/config/testdata/full-config.json | 3 +- agent/http.go | 23 +--- agent/metrics_test.go | 65 +---------- lib/telemetry.go | 8 +- .../docs/agent/config/config-files.mdx | 3 - website/content/docs/agent/telemetry.mdx | 105 +++++++++--------- .../docs/upgrading/upgrade-specific.mdx | 12 +- 14 files changed, 72 insertions(+), 167 deletions(-) create mode 100644 .changelog/13532.txt diff --git a/.changelog/13532.txt b/.changelog/13532.txt new file mode 100644 index 0000000000..34681c96a7 --- /dev/null +++ b/.changelog/13532.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +telemetry: config flag `telemetry { disable_compat_1.9 = (true|false) }` has been removed. Before upgrading you should remove this flag from your config if the flag is being used. +``` \ No newline at end of file diff --git a/agent/agent.go b/agent/agent.go index d337f75f01..47d16a10e7 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -740,12 +740,6 @@ func (a *Agent) Start(ctx context.Context) error { go a.retryJoinWAN() } - // DEPRECATED: Warn users if they're emitting deprecated metrics. Remove this warning and the flagged metrics in a - // future release of Consul. - if !a.config.Telemetry.DisableCompatOneNine { - a.logger.Warn("DEPRECATED Backwards compatibility with pre-1.9 metrics enabled. These metrics will be removed in Consul 1.13. Consider not using this flag and rework instrumentation for 1.10 style http metrics.") - } - if a.tlsConfigurator.Cert() != nil { m := tlsCertExpirationMonitor(a.tlsConfigurator, a.logger) go m.Monitor(&lib.StopChannelContext{StopCh: a.shutdownCh}) @@ -3891,12 +3885,6 @@ func (a *Agent) reloadConfig(autoReload bool) error { } } - // DEPRECATED: Warn users on reload if they're emitting deprecated metrics. Remove this warning and the flagged - // metrics in a future release of Consul. - if !a.config.Telemetry.DisableCompatOneNine { - a.logger.Warn("DEPRECATED Backwards compatibility with pre-1.9 metrics enabled. These metrics will be removed in Consul 1.13. Consider not using this flag and rework instrumentation for 1.10 style http metrics.") - } - return a.reloadConfigInternal(newCfg) } diff --git a/agent/config/builder.go b/agent/config/builder.go index 39c15c5d14..f855aae516 100644 --- a/agent/config/builder.go +++ b/agent/config/builder.go @@ -915,7 +915,6 @@ func (b *builder) build() (rt RuntimeConfig, err error) { CirconusCheckTags: stringVal(c.Telemetry.CirconusCheckTags), CirconusSubmissionInterval: stringVal(c.Telemetry.CirconusSubmissionInterval), CirconusSubmissionURL: stringVal(c.Telemetry.CirconusSubmissionURL), - DisableCompatOneNine: boolValWithDefault(c.Telemetry.DisableCompatOneNine, true), DisableHostname: boolVal(c.Telemetry.DisableHostname), DogstatsdAddr: stringVal(c.Telemetry.DogstatsdAddr), DogstatsdTags: c.Telemetry.DogstatsdTags, diff --git a/agent/config/config.go b/agent/config/config.go index adef2e8772..c4f752a823 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -673,7 +673,6 @@ type Telemetry struct { CirconusCheckTags *string `mapstructure:"circonus_check_tags"` CirconusSubmissionInterval *string `mapstructure:"circonus_submission_interval"` CirconusSubmissionURL *string `mapstructure:"circonus_submission_url"` - DisableCompatOneNine *bool `mapstructure:"disable_compat_1.9"` DisableHostname *bool `mapstructure:"disable_hostname"` DogstatsdAddr *string `mapstructure:"dogstatsd_addr"` DogstatsdTags []string `mapstructure:"dogstatsd_tags"` diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index 9ca6cc5993..0963ec07f7 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -6303,7 +6303,6 @@ func TestLoad_FullConfig(t *testing.T) { CirconusCheckTags: "prvO4uBl", CirconusSubmissionInterval: "DolzaflP", CirconusSubmissionURL: "gTcbS93G", - DisableCompatOneNine: true, DisableHostname: true, DogstatsdAddr: "0wSndumK", DogstatsdTags: []string{"3N81zSUB", "Xtj8AnXZ"}, diff --git a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden index 79f3cc25ee..25fbba0c0e 100644 --- a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden +++ b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden @@ -417,7 +417,6 @@ "CirconusSubmissionInterval": "", "CirconusSubmissionURL": "", "Disable": false, - "DisableCompatOneNine": false, "DisableHostname": false, "DogstatsdAddr": "", "DogstatsdTags": [], diff --git a/agent/config/testdata/full-config.hcl b/agent/config/testdata/full-config.hcl index 670d30a16f..bb544b54a5 100644 --- a/agent/config/testdata/full-config.hcl +++ b/agent/config/testdata/full-config.hcl @@ -654,7 +654,6 @@ telemetry { prometheus_retention_time = "15s" statsd_address = "drce87cy" statsite_address = "HpFwKB8R" - disable_compat_1.9 = true } tls { defaults { diff --git a/agent/config/testdata/full-config.json b/agent/config/testdata/full-config.json index 3b08e0f1c0..36f52e6814 100644 --- a/agent/config/testdata/full-config.json +++ b/agent/config/testdata/full-config.json @@ -650,8 +650,7 @@ "metrics_prefix": "ftO6DySn", "prometheus_retention_time": "15s", "statsd_address": "drce87cy", - "statsite_address": "HpFwKB8R", - "disable_compat_1.9": true + "statsite_address": "HpFwKB8R" }, "tls": { "defaults": { diff --git a/agent/http.go b/agent/http.go index 5dbcdf00bd..98beb6feba 100644 --- a/agent/http.go +++ b/agent/http.go @@ -167,22 +167,7 @@ func (s *HTTPHandlers) handler(enableDebug bool) http.Handler { // handleFuncMetrics takes the given pattern and handler and wraps to produce // metrics based on the pattern and request. handleFuncMetrics := func(pattern string, handler http.HandlerFunc) { - // Get the parts of the pattern. We omit any initial empty for the - // leading slash, and put an underscore as a "thing" placeholder if we - // see a trailing slash, which means the part after is parsed. This lets - // us distinguish from things like /v1/query and /v1/query/. - var parts []string - for i, part := range strings.Split(pattern, "/") { - if part == "" { - if i == 0 { - continue - } - part = "_" - } - parts = append(parts, part) - } - - // Tranform the pattern to a valid label by replacing the '/' by '_'. + // Transform the pattern to a valid label by replacing the '/' by '_'. // Omit the leading slash. // Distinguish thing like /v1/query from /v1/query/ by having // an extra underscore. @@ -195,12 +180,6 @@ func (s *HTTPHandlers) handler(enableDebug bool) http.Handler { labels := []metrics.Label{{Name: "method", Value: req.Method}, {Name: "path", Value: path_label}} metrics.MeasureSinceWithLabels([]string{"api", "http"}, start, labels) - - // DEPRECATED Emit pre-1.9 metric as `consul.http...`. This will be removed in 1.13. - if !s.agent.config.Telemetry.DisableCompatOneNine { - key := append([]string{"http", req.Method}, parts...) - metrics.MeasureSince(key, start) - } } var gzipHandler http.Handler diff --git a/agent/metrics_test.go b/agent/metrics_test.go index c4364a677a..fde4047130 100644 --- a/agent/metrics_test.go +++ b/agent/metrics_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - // "github.com/hashicorp/consul/agent/config" + "github.com/stretchr/testify/require" + "github.com/hashicorp/consul/agent/rpc/middleware" "github.com/hashicorp/consul/lib/retry" "github.com/hashicorp/consul/sdk/testutil" "github.com/hashicorp/consul/testrpc" "github.com/hashicorp/consul/tlsutil" - "github.com/stretchr/testify/require" ) func skipIfShortTesting(t *testing.T) { @@ -304,67 +304,6 @@ func TestHTTPHandlers_AgentMetrics_ConsulAutopilot_Prometheus(t *testing.T) { }) } -// TestHTTPHandlers_AgentMetrics_Disable1Dot9MetricsChange adds testing around the 1.9 style metrics -// https://www.consul.io/docs/agent/options#telemetry-disable_compat_1.9 -func TestHTTPHandlers_AgentMetrics_Disable1Dot9MetricsChange(t *testing.T) { - skipIfShortTesting(t) - // This test cannot use t.Parallel() since we modify global state, ie the global metrics instance - - // 1.9 style http metrics looked like this: - // agent_http_2_http_GET_v1_agent_members{quantile="0.5"} 0.1329520046710968 - t.Run("check that no consul.http metrics are emitted by default", func(t *testing.T) { - hcl := ` - telemetry = { - prometheus_retention_time = "5s" - disable_hostname = true - metrics_prefix = "agent_http" - } - ` - - a := StartTestAgent(t, TestAgent{HCL: hcl}) - defer a.Shutdown() - - // we have to use the `a.srv.handler()` to actually trigger the wrapped function - uri := fmt.Sprintf("http://%s%s", a.HTTPAddr(), "/v1/agent/members") - req, err := http.NewRequest("GET", uri, nil) - require.NoError(t, err) - resp := httptest.NewRecorder() - handler := a.srv.handler(true) - handler.ServeHTTP(resp, req) - - respRec := httptest.NewRecorder() - recordPromMetrics(t, a, respRec) - - assertMetricNotExists(t, respRec, "agent_http_http_GET_v1_agent_members") - }) - - t.Run("check that we can still turn on consul.http metrics", func(t *testing.T) { - hcl := ` - telemetry = { - prometheus_retention_time = "5s", - disable_compat_1.9 = false - metrics_prefix = "agent_http_2" - } - ` - - a := StartTestAgent(t, TestAgent{HCL: hcl}) - defer a.Shutdown() - - uri := fmt.Sprintf("http://%s%s", a.HTTPAddr(), "/v1/agent/members") - req, err := http.NewRequest("GET", uri, nil) - require.NoError(t, err) - resp := httptest.NewRecorder() - - handler := a.srv.handler(true) - handler.ServeHTTP(resp, req) - - respRec := httptest.NewRecorder() - recordPromMetrics(t, a, respRec) - - assertMetricExists(t, respRec, "agent_http_2_http_GET_v1_agent_members") - }) -} - func TestHTTPHandlers_AgentMetrics_TLSCertExpiry_Prometheus(t *testing.T) { skipIfShortTesting(t) // This test cannot use t.Parallel() since we modify global state, ie the global metrics instance diff --git a/lib/telemetry.go b/lib/telemetry.go index 2a90fe79e4..b5815ff64e 100644 --- a/lib/telemetry.go +++ b/lib/telemetry.go @@ -12,9 +12,10 @@ import ( "github.com/armon/go-metrics/circonus" "github.com/armon/go-metrics/datadog" "github.com/armon/go-metrics/prometheus" - "github.com/hashicorp/consul/lib/retry" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-multierror" + + "github.com/hashicorp/consul/lib/retry" ) // TelemetryConfig is embedded in config.RuntimeConfig and holds the @@ -139,11 +140,6 @@ type TelemetryConfig struct { // hcl: telemetry { circonus_submission_url = string } CirconusSubmissionURL string `json:"circonus_submission_url,omitempty" mapstructure:"circonus_submission_url"` - // DisableCompatOneNine is a flag to stop emitting metrics that have been deprecated in version 1.9. - // - // hcl: telemetry { disable_compat_1.9 = (true|false) } - DisableCompatOneNine bool `json:"disable_compat_1.9,omitempty" mapstructure:"disable_compat_1.9"` - // DisableHostname will disable hostname prefixing for all metrics. // // hcl: telemetry { disable_hostname = (true|false) diff --git a/website/content/docs/agent/config/config-files.mdx b/website/content/docs/agent/config/config-files.mdx index 449753b206..5fb0c849c1 100644 --- a/website/content/docs/agent/config/config-files.mdx +++ b/website/content/docs/agent/config/config-files.mdx @@ -1684,9 +1684,6 @@ Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'." be used based on **where** this particular instance is running (e.g. a specific geo location or datacenter, dc:sfo). By default, this is left blank and not used. - - `disable_compat_1.9` ((#telemetry-disable_compat_1.9)) - This allows users to disable metrics deprecated in 1.9 so they are no longer emitted, improving performance and reducing storage in large deployments. As of 1.12 this defaults to `true` and will be removed, along with 1.9 style http metrics in 1.13. - - `disable_hostname` ((#telemetry-disable_hostname)) This controls whether or not to prepend runtime telemetry with the machine's hostname, defaults to false. diff --git a/website/content/docs/agent/telemetry.mdx b/website/content/docs/agent/telemetry.mdx index 8e8618f335..3bb5013b87 100644 --- a/website/content/docs/agent/telemetry.mdx +++ b/website/content/docs/agent/telemetry.mdx @@ -349,59 +349,58 @@ populated free list structure. This is a full list of metrics emitted by Consul. -| Metric | Description | Unit | Type | -|--------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|---------| -| `consul.acl.blocked.{check,service}.deregistration` | Increments whenever a deregistration fails for an entity (check or service) is blocked by an ACL. | requests | counter | -| `consul.acl.blocked.{check,node,service}.registration` | Increments whenever a registration fails for an entity (check, node or service) is blocked by an ACL. | requests | counter | -| `consul.api.http` | Migrated from `consul.http..`. Samples how long it takes to service the given HTTP request for the given verb and path. Includes labels for `path` and `method`. `path` does not include details like service or key names, for these an underscore will be present as a placeholder (eg. path=`v1.kv._`) | ms | timer | -| `consul.client.rpc` | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server. This gives a measure of how much a given agent is loading the Consul servers. Currently, this is only generated by agents in client mode, not Consul servers. | requests | counter | -| `consul.client.rpc.exceeded` | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server gets rate limited by that agent's [`limits`](/docs/agent/config/config-files#limits) configuration. This gives an indication that there's an abusive application making too many requests on the agent, or that the rate limit needs to be increased. Currently, this only applies to agents in client mode, not Consul servers. | rejected requests | counter | -| `consul.client.rpc.failed` | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server and fails. | requests | counter | -| `consul.client.api.catalog_register` | Increments whenever a Consul agent receives a catalog register request. | requests | counter | -| `consul.client.api.success.catalog_register` | Increments whenever a Consul agent successfully responds to a catalog register request. | requests | counter | -| `consul.client.rpc.error.catalog_register` | Increments whenever a Consul agent receives an RPC error for a catalog register request. | errors | counter | -| `consul.client.api.catalog_deregister` | Increments whenever a Consul agent receives a catalog deregister request. | requests | counter | -| `consul.client.api.success.catalog_deregister` | Increments whenever a Consul agent successfully responds to a catalog deregister request. | requests | counter | -| `consul.client.rpc.error.catalog_deregister` | Increments whenever a Consul agent receives an RPC error for a catalog deregister request. | errors | counter | -| `consul.client.api.catalog_datacenters` | Increments whenever a Consul agent receives a request to list datacenters in the catalog. | requests | counter | -| `consul.client.api.success.catalog_datacenters` | Increments whenever a Consul agent successfully responds to a request to list datacenters. | requests | counter | -| `consul.client.rpc.error.catalog_datacenters` | Increments whenever a Consul agent receives an RPC error for a request to list datacenters. | errors | counter | -| `consul.client.api.catalog_nodes` | Increments whenever a Consul agent receives a request to list nodes from the catalog. | requests | counter | -| `consul.client.api.success.catalog_nodes` | Increments whenever a Consul agent successfully responds to a request to list nodes. | requests | counter | -| `consul.client.rpc.error.catalog_nodes` | Increments whenever a Consul agent receives an RPC error for a request to list nodes. | errors | counter | -| `consul.client.api.catalog_services` | Increments whenever a Consul agent receives a request to list services from the catalog. | requests | counter | -| `consul.client.api.success.catalog_services` | Increments whenever a Consul agent successfully responds to a request to list services. | requests | counter | -| `consul.client.rpc.error.catalog_services` | Increments whenever a Consul agent receives an RPC error for a request to list services. | errors | counter | -| `consul.client.api.catalog_service_nodes` | Increments whenever a Consul agent receives a request to list nodes offering a service. | requests | counter | -| `consul.client.api.success.catalog_service_nodes` | Increments whenever a Consul agent successfully responds to a request to list nodes offering a service. | requests | counter | -| `consul.client.api.error.catalog_service_nodes` | Increments whenever a Consul agent receives an RPC error for request to list nodes offering a service. | requests | counter | -| `consul.client.rpc.error.catalog_service_nodes` | Increments whenever a Consul agent receives an RPC error for a request to list nodes offering a service. | errors | counter | -| `consul.client.api.catalog_node_services` | Increments whenever a Consul agent receives a request to list services registered in a node. | requests | counter | -| `consul.client.api.success.catalog_node_services` | 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` | Increments whenever a Consul agent receives an RPC error for a request to list services in a node. | errors | counter | -| `consul.client.api.catalog_node_service_list` | Increments whenever a Consul agent receives a request to list a node's registered services. | requests | counter | -| `consul.client.rpc.error.catalog_node_service_list` | Increments whenever a Consul agent receives an RPC error for request to list a node's registered services. | errors | counter | -| `consul.client.api.success.catalog_node_service_list` | Increments whenever a Consul agent successfully responds to a request to list a node's registered services. | requests | counter | -| `consul.client.api.catalog_gateway_services` | Increments whenever a Consul agent receives a request to list services associated with a gateway. | requests | counter | -| `consul.client.api.success.catalog_gateway_services` | 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` | 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` | 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 | -| `consul.runtime.alloc_bytes` | Measures the number of bytes allocated by the Consul process. This may burst from time to time but should return to a steady state value. | bytes | gauge | -| `consul.runtime.heap_objects` | Measures the number of objects allocated on the heap and is a general memory pressure indicator. This may burst from time to time but should return to a steady state value. | number of objects | gauge | -| `consul.state.nodes` | Measures the current number of nodes registered with Consul. It is only emitted by Consul servers. Added in v1.9.0. | number of objects | gauge | -| `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 | -| `consul.dns.ptr_query` | Measures the time spent handling a reverse DNS query for the given node. | ms | timer | -| `consul.dns.domain_query` | Measures the time spent handling a domain query for the given node. | ms | timer | -| `consul.http..` | DEPRECATED IN 1.9: Tracks how long it takes to service the given HTTP request for the given verb and path. Paths do not include details like service or key names, for these an underscore will be present as a placeholder (eg. `consul.http.GET.v1.kv._`) | ms | timer | -| `consul.system.licenseExpiration` | This measures the number of hours remaining on the agents license. | hours | gauge | -| `consul.version` | Represents the Consul version. | agents | gauge | +| Metric | Description | Unit | Type | +| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------- | +| `consul.acl.blocked.{check,service}.deregistration` | Increments whenever a deregistration fails for an entity (check or service) is blocked by an ACL. | requests | counter | +| `consul.acl.blocked.{check,node,service}.registration` | Increments whenever a registration fails for an entity (check, node or service) is blocked by an ACL. | requests | counter | +| `consul.api.http` | This samples how long it takes to service the given HTTP request for the given verb and path. Includes labels for `path` and `method`. `path` does not include details like service or key names, for these an underscore will be present as a placeholder (eg. path=`v1.kv._`) | ms | timer | +| `consul.client.rpc` | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server. This gives a measure of how much a given agent is loading the Consul servers. Currently, this is only generated by agents in client mode, not Consul servers. | requests | counter | +| `consul.client.rpc.exceeded` | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server gets rate limited by that agent's [`limits`](/docs/agent/config/config-files#limits) configuration. This gives an indication that there's an abusive application making too many requests on the agent, or that the rate limit needs to be increased. Currently, this only applies to agents in client mode, not Consul servers. | rejected requests | counter | +| `consul.client.rpc.failed` | Increments whenever a Consul agent in client mode makes an RPC request to a Consul server and fails. | requests | counter | +| `consul.client.api.catalog_register.` | Increments whenever a Consul agent receives a catalog register request. | requests | counter | +| `consul.client.api.success.catalog_register.` | Increments whenever a Consul agent successfully responds to a catalog register request. | requests | counter | +| `consul.client.rpc.error.catalog_register.` | Increments whenever a Consul agent receives an RPC error for a catalog register request. | errors | counter | +| `consul.client.api.catalog_deregister.` | Increments whenever a Consul agent receives a catalog deregister request. | requests | counter | +| `consul.client.api.success.catalog_deregister.` | Increments whenever a Consul agent successfully responds to a catalog deregister request. | requests | counter | +| `consul.client.rpc.error.catalog_deregister.` | Increments whenever a Consul agent receives an RPC error for a catalog deregister request. | errors | counter | +| `consul.client.api.catalog_datacenters.` | Increments whenever a Consul agent receives a request to list datacenters in the catalog. | requests | counter | +| `consul.client.api.success.catalog_datacenters.` | Increments whenever a Consul agent successfully responds to a request to list datacenters. | requests | counter | +| `consul.client.rpc.error.catalog_datacenters.` | Increments whenever a Consul agent receives an RPC error for a request to list datacenters. | errors | counter | +| `consul.client.api.catalog_nodes.` | Increments whenever a Consul agent receives a request to list nodes from the catalog. | requests | counter | +| `consul.client.api.success.catalog_nodes.` | Increments whenever a Consul agent successfully responds to a request to list nodes. | requests | counter | +| `consul.client.rpc.error.catalog_nodes.` | Increments whenever a Consul agent receives an RPC error for a request to list nodes. | errors | counter | +| `consul.client.api.catalog_services.` | Increments whenever a Consul agent receives a request to list services from the catalog. | requests | counter | +| `consul.client.api.success.catalog_services.` | Increments whenever a Consul agent successfully responds to a request to list services. | requests | counter | +| `consul.client.rpc.error.catalog_services.` | Increments whenever a Consul agent receives an RPC error for a request to list services. | errors | counter | +| `consul.client.api.catalog_service_nodes.` | Increments whenever a Consul agent receives a request to list nodes offering a service. | requests | counter | +| `consul.client.api.success.catalog_service_nodes.` | Increments whenever a Consul agent successfully responds to a request to list nodes offering a service. | requests | counter | +| `consul.client.api.error.catalog_service_nodes.` | Increments whenever a Consul agent receives an RPC error for request to list nodes offering a service. | requests | counter | +| `consul.client.rpc.error.catalog_service_nodes.` | Increments whenever a Consul agent receives an RPC error for a request to list nodes offering a service.   | errors | counter | +| `consul.client.api.catalog_node_services.` | Increments whenever a Consul agent receives a request to list services registered in a node.   | requests | counter | +| `consul.client.api.success.catalog_node_services.` | 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.` | Increments whenever a Consul agent receives an RPC error for a request to list services in a node.   | errors | counter | +| `consul.client.api.catalog_node_service_list` | Increments whenever a Consul agent receives a request to list a node's registered services. | requests | counter | +| `consul.client.rpc.error.catalog_node_service_list` | Increments whenever a Consul agent receives an RPC error for request to list a node's registered services. | errors | counter | +| `consul.client.api.success.catalog_node_service_list` | Increments whenever a Consul agent successfully responds to a request to list a node's registered services. | requests | counter | +| `consul.client.api.catalog_gateway_services.` | Increments whenever a Consul agent receives a request to list services associated with a gateway. | requests | counter | +| `consul.client.api.success.catalog_gateway_services.` | 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.` | 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` | 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 | +| `consul.runtime.alloc_bytes` | Measures the number of bytes allocated by the Consul process. This may burst from time to time but should return to a steady state value. | bytes | gauge | +| `consul.runtime.heap_objects` | Measures the number of objects allocated on the heap and is a general memory pressure indicator. This may burst from time to time but should return to a steady state value. | number of objects | gauge | +| `consul.state.nodes` | Measures the current number of nodes registered with Consul. It is only emitted by Consul servers. Added in v1.9.0. | number of objects | gauge | +| `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 | +| `consul.dns.ptr_query.` | Measures the time spent handling a reverse DNS query for the given node. | ms | timer | +| `consul.dns.domain_query.` | Measures the time spent handling a domain query for the given node. | ms | timer | +| `consul.system.licenseExpiration` | This measures the number of hours remaining on the agents license. | hours | gauge | +| `consul.version` | Represents the Consul version. | agents | gauge | ## Server Health diff --git a/website/content/docs/upgrading/upgrade-specific.mdx b/website/content/docs/upgrading/upgrade-specific.mdx index d9bae7d6c7..a9a72c3f92 100644 --- a/website/content/docs/upgrading/upgrade-specific.mdx +++ b/website/content/docs/upgrading/upgrade-specific.mdx @@ -14,6 +14,16 @@ provided for their upgrades as a result of new features or changed behavior. This page is used to document those details separately from the standard upgrade flow. +## Consul 1.13.0 + +### 1.9 Telemetry Compatibility + +#### Removing configuration options + +The [`disable_compat_19`](/docs/agent/options#telemetry-disable_compat_1.9) telemetry configuration option is now removed. +In prior Consul versions (1.10.x through 1.11.x), the config defaulted to `false`. In 1.12.x it defaulted to `true`. +If you were using this flag, you must remove it before upgrading. + ## Consul 1.12.0 ### 1.9 Telemetry Compatibility @@ -28,7 +38,7 @@ style `consul.api.http...` metrics and removing the configuration flag from your ### Nomad Namespace Incompatibility -Nomad Enterprise users should not upgrade to Consul Enterprise 1.12.0. +Nomad Enterprise users should not upgrade to Consul Enterprise 1.12.0. Consul 1.12.0 Enterprise introduced a change that prevents Nomad Enterprise from removing services from non-default Consul namespaces. To avoid errors, we recommend that Nomad Enterprise users wait to update Consul Enterprise until we fix this issue in a future release.