diff --git a/.changelog/9207.txt b/.changelog/9207.txt new file mode 100644 index 000000000..a29bbdb3c --- /dev/null +++ b/.changelog/9207.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +connect: Update Envoy metrics names and labels for proxy listeners so that attributes like datacenter and namespace can be extracted. +``` \ No newline at end of file diff --git a/agent/xds/listeners.go b/agent/xds/listeners.go index 64ea87268..dcf8f76d2 100644 --- a/agent/xds/listeners.go +++ b/agent/xds/listeners.go @@ -319,7 +319,7 @@ func (s *Server) makeIngressGatewayListeners(address string, cfgSnap *proxycfg.C filterName: listenerKey.RouteName(), routeName: listenerKey.RouteName(), cluster: "", - statPrefix: "ingress_upstream_", + statPrefix: "ingress_upstream.", routePath: "", ingress: false, httpAuthzFilter: nil, @@ -771,7 +771,7 @@ func (s *Server) makeTerminatingGatewayListener( // This fallback catch-all filter ensures a listener will be present for health checks to pass // Envoy will reset these connections since known endpoints are caught by filter chain matches above - tcpProxy, err := makeTCPProxyFilter(name, "", "terminating_gateway_") + tcpProxy, err := makeTCPProxyFilter(name, "", "terminating_gateway.") if err != nil { return nil, err } @@ -821,7 +821,7 @@ func (s *Server) makeFilterChainTerminatingGateway( // Lastly we setup the actual proxying component. For L4 this is a straight // tcp proxy. For L7 this is a very hands-off HTTP proxy just to inject an // HTTP filter to do intention checks here instead. - statPrefix := fmt.Sprintf("terminating_gateway_%s_%s_", service.NamespaceOrDefault(), service.Name) + statPrefix := fmt.Sprintf("terminating_gateway.%s.%s.", service.NamespaceOrDefault(), service.Name) opts := listenerFilterOpts{ protocol: protocol, filterName: listener, @@ -868,7 +868,7 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p // The cluster name here doesn't matter as the sni_cluster // filter will fill it in for us. - tcpProxy, err := makeTCPProxyFilter(name, "", "mesh_gateway_local_") + tcpProxy, err := makeTCPProxyFilter(name, "", "mesh_gateway_local.") if err != nil { return nil, err } @@ -891,8 +891,8 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p continue // skip local } clusterName := connect.DatacenterSNI(dc, cfgSnap.Roots.TrustDomain) - filterName := fmt.Sprintf("%s_%s", name, dc) - dcTCPProxy, err := makeTCPProxyFilter(filterName, clusterName, "mesh_gateway_remote_") + filterName := fmt.Sprintf("%s.%s", name, dc) + dcTCPProxy, err := makeTCPProxyFilter(filterName, clusterName, "mesh_gateway_remote.") if err != nil { return nil, err } @@ -913,8 +913,8 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p continue // skip local } clusterName := cfgSnap.ServerSNIFn(dc, "") - filterName := fmt.Sprintf("%s_%s", name, dc) - dcTCPProxy, err := makeTCPProxyFilter(filterName, clusterName, "mesh_gateway_remote_") + filterName := fmt.Sprintf("%s.%s", name, dc) + dcTCPProxy, err := makeTCPProxyFilter(filterName, clusterName, "mesh_gateway_remote.") if err != nil { return nil, err } @@ -933,8 +933,8 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p for _, srv := range cfgSnap.MeshGateway.ConsulServers { clusterName := cfgSnap.ServerSNIFn(cfgSnap.Datacenter, srv.Node.Node) - filterName := fmt.Sprintf("%s_%s", name, cfgSnap.Datacenter) - dcTCPProxy, err := makeTCPProxyFilter(filterName, clusterName, "mesh_gateway_local_server_") + filterName := fmt.Sprintf("%s.%s", name, cfgSnap.Datacenter) + dcTCPProxy, err := makeTCPProxyFilter(filterName, clusterName, "mesh_gateway_local_server.") if err != nil { return nil, err } @@ -976,38 +976,61 @@ func (s *Server) makeUpstreamListenerForDiscoveryChain( } useRDS := true - clusterName := "" + var ( + clusterName string + destination, datacenter, namespace string + ) if chain == nil || chain.IsDefault() { + useRDS = false + dc := u.Datacenter if dc == "" { dc = cfgSnap.Datacenter } - sni := connect.UpstreamSNI(u, "", dc, cfgSnap.Roots.TrustDomain) + destination, datacenter, namespace = u.DestinationName, dc, u.DestinationNamespace - useRDS = false + sni := connect.UpstreamSNI(u, "", dc, cfgSnap.Roots.TrustDomain) clusterName = CustomizeClusterName(sni, chain) - } else if cfg.Protocol == "tcp" { - startNode := chain.Nodes[chain.StartNode] - if startNode == nil { - return nil, fmt.Errorf("missing first node in compiled discovery chain for: %s", chain.ServiceName) - } else if startNode.Type != structs.DiscoveryGraphNodeTypeResolver { - return nil, fmt.Errorf("unexpected first node in discovery chain using protocol=%q: %s", cfg.Protocol, startNode.Type) - } - targetID := startNode.Resolver.Target - target := chain.Targets[targetID] + } else { + destination, datacenter, namespace = chain.ServiceName, chain.Datacenter, chain.Namespace - useRDS = false - clusterName = CustomizeClusterName(target.Name, chain) + if cfg.Protocol == "tcp" { + useRDS = false + + startNode := chain.Nodes[chain.StartNode] + if startNode == nil { + return nil, fmt.Errorf("missing first node in compiled discovery chain for: %s", chain.ServiceName) + } + if startNode.Type != structs.DiscoveryGraphNodeTypeResolver { + return nil, fmt.Errorf("unexpected first node in discovery chain using protocol=%q: %s", cfg.Protocol, startNode.Type) + } + targetID := startNode.Resolver.Target + target := chain.Targets[targetID] + + clusterName = CustomizeClusterName(target.Name, chain) + } + } + + // Default the namespace to match how SNIs are generated + if namespace == "" { + namespace = structs.IntentionDefaultNamespace + } + filterName := fmt.Sprintf("%s.%s.%s", destination, namespace, datacenter) + + if u.DestinationType == structs.UpstreamDestTypePreparedQuery { + // Avoid encoding dc and namespace for prepared queries. + // Those are defined in the query itself and are not available here. + filterName = upstreamID } opts := listenerFilterOpts{ useRDS: useRDS, protocol: cfg.Protocol, - filterName: upstreamID, + filterName: filterName, routeName: upstreamID, cluster: clusterName, - statPrefix: "upstream_", + statPrefix: "upstream.", routePath: "", ingress: false, httpAuthzFilter: nil, @@ -1120,17 +1143,17 @@ func makeSNIClusterFilter() (*envoylistener.Filter, error) { func makeTCPProxyFilter(filterName, cluster, statPrefix string) (*envoylistener.Filter, error) { cfg := &envoytcp.TcpProxy{ - StatPrefix: makeStatPrefix("tcp", statPrefix, filterName), + StatPrefix: makeStatPrefix(statPrefix, filterName), ClusterSpecifier: &envoytcp.TcpProxy_Cluster{Cluster: cluster}, } return makeFilter("envoy.tcp_proxy", cfg, false) } -func makeStatPrefix(protocol, prefix, filterName string) string { +func makeStatPrefix(prefix, filterName string) string { // Replace colons here because Envoy does that in the metrics for the actual // clusters but doesn't in the stat prefix here while dashboards assume they // will match. - return fmt.Sprintf("%s%s_%s", prefix, strings.Replace(filterName, ":", "_", -1), protocol) + return fmt.Sprintf("%s%s", prefix, strings.Replace(filterName, ":", "_", -1)) } func makeHTTPFilter(opts listenerFilterOpts) (*envoylistener.Filter, error) { @@ -1138,13 +1161,9 @@ func makeHTTPFilter(opts listenerFilterOpts) (*envoylistener.Filter, error) { if !opts.ingress { op = envoyhttp.HttpConnectionManager_Tracing_EGRESS } - proto := "http" - if opts.protocol == "grpc" { - proto = opts.protocol - } cfg := &envoyhttp.HttpConnectionManager{ - StatPrefix: makeStatPrefix(proto, opts.statPrefix, opts.filterName), + StatPrefix: makeStatPrefix(opts.statPrefix, opts.filterName), CodecType: envoyhttp.HttpConnectionManager_AUTO, HttpFilters: []*envoyhttp.HttpFilter{ { diff --git a/agent/xds/listeners_test.go b/agent/xds/listeners_test.go index 5b08ab637..d04c118d0 100644 --- a/agent/xds/listeners_test.go +++ b/agent/xds/listeners_test.go @@ -577,7 +577,7 @@ func expectListenerJSONResources(t *testing.T, snap *proxycfg.ConfigSnapshot) ma "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] @@ -600,7 +600,7 @@ func expectListenerJSONResources(t *testing.T, snap *proxycfg.ConfigSnapshot) ma "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -623,7 +623,7 @@ func expectListenerJSONResources(t *testing.T, snap *proxycfg.ConfigSnapshot) ma "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-13-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-13-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-14-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-14-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-15-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-15-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-16-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-and-overrides.envoy-1-16-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-13-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-14-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-15-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-16-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-chain-external-sni.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-13-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-13-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-14-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-14-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-15-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-15-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-16-x.golden index e835edf4d..9440dc5fe 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-grpc-chain.envoy-1-16-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-13-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-13-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-14-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-14-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-15-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-15-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-16-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http-chain.envoy-1-16-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-13-x.golden index 11d1ddf64..d8cffd7c5 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-13-x.golden @@ -30,7 +30,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -58,7 +58,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -112,7 +112,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-14-x.golden index 11d1ddf64..d8cffd7c5 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-14-x.golden @@ -30,7 +30,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -58,7 +58,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -112,7 +112,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-15-x.golden index 11d1ddf64..d8cffd7c5 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-15-x.golden @@ -30,7 +30,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -58,7 +58,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -112,7 +112,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-16-x.golden index 11d1ddf64..d8cffd7c5 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-http2-chain.envoy-1-16-x.golden @@ -30,7 +30,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -58,7 +58,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -112,7 +112,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-13-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-13-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-14-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-14-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-15-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-15-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-16-x.golden b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-16-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/connect-proxy-with-tcp-chain.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-13-x.golden index 21137f9eb..447ad21fe 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-13-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-14-x.golden index 21137f9eb..447ad21fe 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-14-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-15-x.golden index 21137f9eb..447ad21fe 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-15-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-16-x.golden index 21137f9eb..447ad21fe 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2-typed.envoy-1-16-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-13-x.golden index 301330c58..d7454bfc6 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-13-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-14-x.golden index 301330c58..d7454bfc6 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-14-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-15-x.golden index 301330c58..d7454bfc6 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-15-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-16-x.golden index 301330c58..d7454bfc6 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-2.envoy-1-16-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-13-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-13-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-14-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-14-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-15-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-15-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-16-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-missing.envoy-1-16-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-13-x.golden index 0743cf8c8..7a0a77371 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-13-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-14-x.golden index 0743cf8c8..7a0a77371 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-14-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-15-x.golden index 0743cf8c8..7a0a77371 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-15-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-16-x.golden index 0743cf8c8..7a0a77371 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http-typed.envoy-1-16-x.golden @@ -95,7 +95,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -118,7 +118,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-13-x.golden index e94c7711f..f512fda8d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-13-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-14-x.golden index e94c7711f..f512fda8d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-14-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-15-x.golden index e94c7711f..f512fda8d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-15-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-16-x.golden index e94c7711f..f512fda8d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener-http.envoy-1-16-x.golden @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-13-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-13-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-14-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-14-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-15-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-15-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-16-x.golden index 23cf9572e..463afd84d 100644 --- a/agent/xds/testdata/listeners/custom-public-listener.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-public-listener.envoy-1-16-x.golden @@ -71,7 +71,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-13-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-14-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-15-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-16-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream-typed-ignored-with-disco-chain.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream.envoy-1-13-x.golden b/agent/xds/testdata/listeners/custom-upstream.envoy-1-13-x.golden index 2a10b9b05..5352d5dce 100644 --- a/agent/xds/testdata/listeners/custom-upstream.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream.envoy-1-13-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream.envoy-1-14-x.golden b/agent/xds/testdata/listeners/custom-upstream.envoy-1-14-x.golden index 2a10b9b05..5352d5dce 100644 --- a/agent/xds/testdata/listeners/custom-upstream.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream.envoy-1-14-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream.envoy-1-15-x.golden b/agent/xds/testdata/listeners/custom-upstream.envoy-1-15-x.golden index 2a10b9b05..5352d5dce 100644 --- a/agent/xds/testdata/listeners/custom-upstream.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream.envoy-1-15-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/custom-upstream.envoy-1-16-x.golden b/agent/xds/testdata/listeners/custom-upstream.envoy-1-16-x.golden index 2a10b9b05..5352d5dce 100644 --- a/agent/xds/testdata/listeners/custom-upstream.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/custom-upstream.envoy-1-16-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/defaults.envoy-1-13-x.golden b/agent/xds/testdata/listeners/defaults.envoy-1-13-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/defaults.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/defaults.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/defaults.envoy-1-14-x.golden b/agent/xds/testdata/listeners/defaults.envoy-1-14-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/defaults.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/defaults.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/defaults.envoy-1-15-x.golden b/agent/xds/testdata/listeners/defaults.envoy-1-15-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/defaults.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/defaults.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/defaults.envoy-1-16-x.golden b/agent/xds/testdata/listeners/defaults.envoy-1-16-x.golden index d43380ee1..fd505a15c 100644 --- a/agent/xds/testdata/listeners/defaults.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/defaults.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-13-x.golden b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-13-x.golden index 485f366fe..8a98dc9ea 100644 --- a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-13-x.golden @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -94,7 +94,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health2_21501_http", + "stat_prefix": "exposed_path_filter_health2_21501", "tracing": { "random_sampling": { } @@ -132,7 +132,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-14-x.golden b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-14-x.golden index 485f366fe..8a98dc9ea 100644 --- a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-14-x.golden @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -94,7 +94,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health2_21501_http", + "stat_prefix": "exposed_path_filter_health2_21501", "tracing": { "random_sampling": { } @@ -132,7 +132,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-15-x.golden b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-15-x.golden index 485f366fe..8a98dc9ea 100644 --- a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-15-x.golden @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -94,7 +94,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health2_21501_http", + "stat_prefix": "exposed_path_filter_health2_21501", "tracing": { "random_sampling": { } @@ -132,7 +132,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-16-x.golden b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-16-x.golden index 485f366fe..8a98dc9ea 100644 --- a/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-local-app-paths.envoy-1-16-x.golden @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -94,7 +94,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health2_21501_http", + "stat_prefix": "exposed_path_filter_health2_21501", "tracing": { "random_sampling": { } @@ -132,7 +132,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-13-x.golden b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-13-x.golden index d16f93c99..6e0240927 100644 --- a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-13-x.golden @@ -44,7 +44,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501_http", + "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501", "tracing": { "random_sampling": { } @@ -96,7 +96,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -134,7 +134,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-14-x.golden b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-14-x.golden index d16f93c99..6e0240927 100644 --- a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-14-x.golden @@ -44,7 +44,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501_http", + "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501", "tracing": { "random_sampling": { } @@ -96,7 +96,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -134,7 +134,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-15-x.golden b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-15-x.golden index d16f93c99..6e0240927 100644 --- a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-15-x.golden @@ -44,7 +44,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501_http", + "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501", "tracing": { "random_sampling": { } @@ -96,7 +96,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -134,7 +134,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-16-x.golden b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-16-x.golden index d16f93c99..6e0240927 100644 --- a/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/expose-paths-new-cluster-http2.envoy-1-16-x.golden @@ -44,7 +44,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501_http", + "stat_prefix": "exposed_path_filter_grpchealthv1HealthCheck_21501", "tracing": { "random_sampling": { } @@ -96,7 +96,7 @@ } ] }, - "stat_prefix": "exposed_path_filter_health1_21500_http", + "stat_prefix": "exposed_path_filter_health1_21500", "tracing": { "random_sampling": { } @@ -134,7 +134,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/http-public-listener.envoy-1-13-x.golden b/agent/xds/testdata/listeners/http-public-listener.envoy-1-13-x.golden index f8eb24c53..71a1d33ef 100644 --- a/agent/xds/testdata/listeners/http-public-listener.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/http-public-listener.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -118,7 +118,7 @@ } ] }, - "stat_prefix": "public_listener_http", + "stat_prefix": "public_listener", "tracing": { "random_sampling": { } diff --git a/agent/xds/testdata/listeners/http-public-listener.envoy-1-14-x.golden b/agent/xds/testdata/listeners/http-public-listener.envoy-1-14-x.golden index f8eb24c53..71a1d33ef 100644 --- a/agent/xds/testdata/listeners/http-public-listener.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/http-public-listener.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -118,7 +118,7 @@ } ] }, - "stat_prefix": "public_listener_http", + "stat_prefix": "public_listener", "tracing": { "random_sampling": { } diff --git a/agent/xds/testdata/listeners/http-public-listener.envoy-1-15-x.golden b/agent/xds/testdata/listeners/http-public-listener.envoy-1-15-x.golden index f8eb24c53..71a1d33ef 100644 --- a/agent/xds/testdata/listeners/http-public-listener.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/http-public-listener.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -118,7 +118,7 @@ } ] }, - "stat_prefix": "public_listener_http", + "stat_prefix": "public_listener", "tracing": { "random_sampling": { } diff --git a/agent/xds/testdata/listeners/http-public-listener.envoy-1-16-x.golden b/agent/xds/testdata/listeners/http-public-listener.envoy-1-16-x.golden index f8eb24c53..71a1d33ef 100644 --- a/agent/xds/testdata/listeners/http-public-listener.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/http-public-listener.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -118,7 +118,7 @@ } ] }, - "stat_prefix": "public_listener_http", + "stat_prefix": "public_listener", "tracing": { "random_sampling": { } diff --git a/agent/xds/testdata/listeners/http-upstream.envoy-1-13-x.golden b/agent/xds/testdata/listeners/http-upstream.envoy-1-13-x.golden index 2acb211dc..36465d5cb 100644 --- a/agent/xds/testdata/listeners/http-upstream.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/http-upstream.envoy-1-13-x.golden @@ -28,7 +28,7 @@ "domains": [ "*" ], - "name": "db", + "name": "db.default.dc1", "routes": [ { "match": { @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -70,7 +70,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -124,7 +124,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/http-upstream.envoy-1-14-x.golden b/agent/xds/testdata/listeners/http-upstream.envoy-1-14-x.golden index 2acb211dc..36465d5cb 100644 --- a/agent/xds/testdata/listeners/http-upstream.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/http-upstream.envoy-1-14-x.golden @@ -28,7 +28,7 @@ "domains": [ "*" ], - "name": "db", + "name": "db.default.dc1", "routes": [ { "match": { @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -70,7 +70,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -124,7 +124,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/http-upstream.envoy-1-15-x.golden b/agent/xds/testdata/listeners/http-upstream.envoy-1-15-x.golden index 2acb211dc..36465d5cb 100644 --- a/agent/xds/testdata/listeners/http-upstream.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/http-upstream.envoy-1-15-x.golden @@ -28,7 +28,7 @@ "domains": [ "*" ], - "name": "db", + "name": "db.default.dc1", "routes": [ { "match": { @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -70,7 +70,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -124,7 +124,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/http-upstream.envoy-1-16-x.golden b/agent/xds/testdata/listeners/http-upstream.envoy-1-16-x.golden index 2acb211dc..36465d5cb 100644 --- a/agent/xds/testdata/listeners/http-upstream.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/http-upstream.envoy-1-16-x.golden @@ -28,7 +28,7 @@ "domains": [ "*" ], - "name": "db", + "name": "db.default.dc1", "routes": [ { "match": { @@ -42,7 +42,7 @@ } ] }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -70,7 +70,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -124,7 +124,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-13-x.golden index edf9167e3..7dc99eceb 100644 --- a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-14-x.golden index edf9167e3..7dc99eceb 100644 --- a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-15-x.golden index edf9167e3..7dc99eceb 100644 --- a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-16-x.golden index edf9167e3..7dc99eceb 100644 --- a/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway-bind-addrs.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -63,7 +63,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-13-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-14-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-15-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-16-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-gateway.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-gateway.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-13-x.golden index 637d58320..d3ce4a744 100644 --- a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-13-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "443" }, - "stat_prefix": "ingress_upstream_443_http", + "stat_prefix": "ingress_upstream.443", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -67,7 +67,7 @@ }, "route_config_name": "8080" }, - "stat_prefix": "ingress_upstream_8080_http", + "stat_prefix": "ingress_upstream.8080", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-14-x.golden index 637d58320..d3ce4a744 100644 --- a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-14-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "443" }, - "stat_prefix": "ingress_upstream_443_http", + "stat_prefix": "ingress_upstream.443", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -67,7 +67,7 @@ }, "route_config_name": "8080" }, - "stat_prefix": "ingress_upstream_8080_http", + "stat_prefix": "ingress_upstream.8080", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-15-x.golden index 637d58320..d3ce4a744 100644 --- a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-15-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "443" }, - "stat_prefix": "ingress_upstream_443_http", + "stat_prefix": "ingress_upstream.443", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -67,7 +67,7 @@ }, "route_config_name": "8080" }, - "stat_prefix": "ingress_upstream_8080_http", + "stat_prefix": "ingress_upstream.8080", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-16-x.golden index 637d58320..d3ce4a744 100644 --- a/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-http-multiple-services.envoy-1-16-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "443" }, - "stat_prefix": "ingress_upstream_443_http", + "stat_prefix": "ingress_upstream.443", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -67,7 +67,7 @@ }, "route_config_name": "8080" }, - "stat_prefix": "ingress_upstream_8080_http", + "stat_prefix": "ingress_upstream.8080", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-13-x.golden index a6e98cd85..eff953490 100644 --- a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-13-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "9191" }, - "stat_prefix": "ingress_upstream_9191_http", + "stat_prefix": "ingress_upstream.9191", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-14-x.golden index a6e98cd85..eff953490 100644 --- a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-14-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "9191" }, - "stat_prefix": "ingress_upstream_9191_http", + "stat_prefix": "ingress_upstream.9191", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-15-x.golden index a6e98cd85..eff953490 100644 --- a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-15-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "9191" }, - "stat_prefix": "ingress_upstream_9191_http", + "stat_prefix": "ingress_upstream.9191", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-16-x.golden index a6e98cd85..eff953490 100644 --- a/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-splitter-with-resolver-redirect.envoy-1-16-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "9191" }, - "stat_prefix": "ingress_upstream_9191_http", + "stat_prefix": "ingress_upstream.9191", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-13-x.golden index a3965f01a..1fb580b67 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-13-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-14-x.golden index a3965f01a..1fb580b67 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-14-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-15-x.golden index a3965f01a..1fb580b67 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-15-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-16-x.golden index a3965f01a..1fb580b67 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-and-overrides.envoy-1-16-x.golden @@ -35,7 +35,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_grpc", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { diff --git a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-13-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-14-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-15-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-16-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-chain-external-sni.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-local-gateway.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden index c91167dfa..0af41618d 100644 --- a/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tcp-chain-failover-through-remote-gateway.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-13-x.golden b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-13-x.golden index fcddd6634..30ebdc036 100644 --- a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-13-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-14-x.golden b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-14-x.golden index fcddd6634..30ebdc036 100644 --- a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-14-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-15-x.golden b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-15-x.golden index fcddd6634..30ebdc036 100644 --- a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-15-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-16-x.golden b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-16-x.golden index fcddd6634..30ebdc036 100644 --- a/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/ingress-with-tls-listener.envoy-1-16-x.golden @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-13-x.golden b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-13-x.golden index 2dbd28ccd..4e7ede85a 100644 --- a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-14-x.golden b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-14-x.golden index 2dbd28ccd..4e7ede85a 100644 --- a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-15-x.golden b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-15-x.golden index 2dbd28ccd..4e7ede85a 100644 --- a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-16-x.golden b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-16-x.golden index 2dbd28ccd..4e7ede85a 100644 --- a/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address-port.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-13-x.golden b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-13-x.golden index 3340f9ca1..3dc403fd3 100644 --- a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-14-x.golden b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-14-x.golden index 3340f9ca1..3dc403fd3 100644 --- a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-15-x.golden b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-15-x.golden index 3340f9ca1..3dc403fd3 100644 --- a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-16-x.golden b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-16-x.golden index 3340f9ca1..3dc403fd3 100644 --- a/agent/xds/testdata/listeners/listener-bind-address.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-address.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-13-x.golden b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-13-x.golden index ead52f0a5..c7e07a6d8 100644 --- a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-13-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-14-x.golden b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-14-x.golden index ead52f0a5..c7e07a6d8 100644 --- a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-14-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-15-x.golden b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-15-x.golden index ead52f0a5..c7e07a6d8 100644 --- a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-15-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-16-x.golden b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-16-x.golden index ead52f0a5..c7e07a6d8 100644 --- a/agent/xds/testdata/listeners/listener-bind-port.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/listener-bind-port.envoy-1-16-x.golden @@ -17,7 +17,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_db_tcp" + "stat_prefix": "upstream.db.default.dc1" } } ] @@ -40,7 +40,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -94,7 +94,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-13-x.golden b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-13-x.golden index 9db1af2fc..0322a5b7f 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-13-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_bar_tcp" + "stat_prefix": "mesh_gateway_local.bar" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_baz_tcp" + "stat_prefix": "mesh_gateway_local.baz" } } ] @@ -180,7 +180,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -196,7 +196,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -212,7 +212,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -226,7 +226,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] @@ -259,7 +259,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc2" } } ] @@ -275,7 +275,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc4" } } ] @@ -291,7 +291,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc6" } } ] @@ -305,7 +305,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_foo_tcp" + "stat_prefix": "mesh_gateway_local.foo" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-14-x.golden b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-14-x.golden index 9db1af2fc..0322a5b7f 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-14-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_bar_tcp" + "stat_prefix": "mesh_gateway_local.bar" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_baz_tcp" + "stat_prefix": "mesh_gateway_local.baz" } } ] @@ -180,7 +180,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -196,7 +196,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -212,7 +212,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -226,7 +226,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] @@ -259,7 +259,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc2" } } ] @@ -275,7 +275,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc4" } } ] @@ -291,7 +291,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc6" } } ] @@ -305,7 +305,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_foo_tcp" + "stat_prefix": "mesh_gateway_local.foo" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-15-x.golden b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-15-x.golden index 9db1af2fc..0322a5b7f 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-15-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_bar_tcp" + "stat_prefix": "mesh_gateway_local.bar" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_baz_tcp" + "stat_prefix": "mesh_gateway_local.baz" } } ] @@ -180,7 +180,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -196,7 +196,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -212,7 +212,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -226,7 +226,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] @@ -259,7 +259,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc2" } } ] @@ -275,7 +275,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc4" } } ] @@ -291,7 +291,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc6" } } ] @@ -305,7 +305,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_foo_tcp" + "stat_prefix": "mesh_gateway_local.foo" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-16-x.golden b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-16-x.golden index 9db1af2fc..0322a5b7f 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-custom-addresses.envoy-1-16-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_bar_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.bar.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_bar_tcp" + "stat_prefix": "mesh_gateway_local.bar" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_baz_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.baz.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_baz_tcp" + "stat_prefix": "mesh_gateway_local.baz" } } ] @@ -180,7 +180,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -196,7 +196,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -212,7 +212,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -226,7 +226,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] @@ -259,7 +259,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc2" } } ] @@ -275,7 +275,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc4" } } ] @@ -291,7 +291,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_foo_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.foo.dc6" } } ] @@ -305,7 +305,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_foo_tcp" + "stat_prefix": "mesh_gateway_local.foo" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-13-x.golden b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-13-x.golden index f020c5a2a..87612918a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-13-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-14-x.golden b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-14-x.golden index f020c5a2a..87612918a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-14-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-15-x.golden b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-15-x.golden index f020c5a2a..87612918a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-15-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-16-x.golden b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-16-x.golden index f020c5a2a..87612918a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-no-services.envoy-1-16-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-13-x.golden b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-13-x.golden index ee5588e97..d964d207a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-13-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_lan_tcp" + "stat_prefix": "mesh_gateway_local.lan" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_wan_tcp" + "stat_prefix": "mesh_gateway_local.wan" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-14-x.golden b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-14-x.golden index ee5588e97..d964d207a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-14-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_lan_tcp" + "stat_prefix": "mesh_gateway_local.lan" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_wan_tcp" + "stat_prefix": "mesh_gateway_local.wan" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-15-x.golden b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-15-x.golden index ee5588e97..d964d207a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-15-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_lan_tcp" + "stat_prefix": "mesh_gateway_local.lan" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_wan_tcp" + "stat_prefix": "mesh_gateway_local.wan" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-16-x.golden b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-16-x.golden index ee5588e97..d964d207a 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-tagged-addresses.envoy-1-16-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_lan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.lan.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_lan_tcp" + "stat_prefix": "mesh_gateway_local.lan" } } ] @@ -101,7 +101,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc2" } } ] @@ -117,7 +117,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc4" } } ] @@ -133,7 +133,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_wan_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.wan.dc6" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_wan_tcp" + "stat_prefix": "mesh_gateway_local.wan" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-13-x.golden b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-13-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-13-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-14-x.golden b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-14-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-14-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-15-x.golden b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-15-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-15-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-16-x.golden b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-16-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway-using-federation-states.envoy-1-16-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-13-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-13-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-14-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-14-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-15-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-15-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-16-x.golden b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-16-x.golden index e2250d535..3b5c85a43 100644 --- a/agent/xds/testdata/listeners/mesh-gateway.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/mesh-gateway.envoy-1-16-x.golden @@ -22,7 +22,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc2.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc2_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc2" } } ] @@ -38,7 +38,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc4.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc4_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc4" } } ] @@ -54,7 +54,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "dc6.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "mesh_gateway_remote_default_dc6_tcp" + "stat_prefix": "mesh_gateway_remote.default.dc6" } } ] @@ -68,7 +68,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "mesh_gateway_local_default_tcp" + "stat_prefix": "mesh_gateway_local.default" } } ] diff --git a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-13-x.golden b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-13-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-13-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-14-x.golden b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-14-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-14-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-15-x.golden b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-15-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-15-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-16-x.golden b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-16-x.golden index a2ecc48cd..2e1467d67 100644 --- a/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/splitter-with-resolver-redirect.envoy-1-16-x.golden @@ -28,7 +28,7 @@ }, "route_config_name": "db" }, - "stat_prefix": "upstream_db_http", + "stat_prefix": "upstream.db.default.dc1", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -56,7 +56,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "upstream_prepared_query_geo-cache_tcp" + "stat_prefix": "upstream.prepared_query_geo-cache" } } ] @@ -110,7 +110,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "local_app", - "stat_prefix": "public_listener_tcp" + "stat_prefix": "public_listener" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden index 0164fc635..6175ab562 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_foo_tcp" + "stat_prefix": "terminating_gateway.default.api.foo" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_foo_tcp" + "stat_prefix": "terminating_gateway.default.cache.foo" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_foo_tcp" + "stat_prefix": "terminating_gateway.default.db.foo" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_foo_tcp" + "stat_prefix": "terminating_gateway.default.web.foo" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_foo_tcp" + "stat_prefix": "terminating_gateway.foo" } } ] @@ -272,7 +272,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_wan_tcp" + "stat_prefix": "terminating_gateway.default.api.wan" } } ] @@ -319,7 +319,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_wan_tcp" + "stat_prefix": "terminating_gateway.default.cache.wan" } } ] @@ -366,7 +366,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_wan_tcp" + "stat_prefix": "terminating_gateway.default.db.wan" } } ] @@ -413,7 +413,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_wan_tcp" + "stat_prefix": "terminating_gateway.default.web.wan" } } ] @@ -427,7 +427,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_wan_tcp" + "stat_prefix": "terminating_gateway.wan" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden index 0164fc635..6175ab562 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_foo_tcp" + "stat_prefix": "terminating_gateway.default.api.foo" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_foo_tcp" + "stat_prefix": "terminating_gateway.default.cache.foo" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_foo_tcp" + "stat_prefix": "terminating_gateway.default.db.foo" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_foo_tcp" + "stat_prefix": "terminating_gateway.default.web.foo" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_foo_tcp" + "stat_prefix": "terminating_gateway.foo" } } ] @@ -272,7 +272,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_wan_tcp" + "stat_prefix": "terminating_gateway.default.api.wan" } } ] @@ -319,7 +319,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_wan_tcp" + "stat_prefix": "terminating_gateway.default.cache.wan" } } ] @@ -366,7 +366,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_wan_tcp" + "stat_prefix": "terminating_gateway.default.db.wan" } } ] @@ -413,7 +413,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_wan_tcp" + "stat_prefix": "terminating_gateway.default.web.wan" } } ] @@ -427,7 +427,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_wan_tcp" + "stat_prefix": "terminating_gateway.wan" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden index 0164fc635..6175ab562 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_foo_tcp" + "stat_prefix": "terminating_gateway.default.api.foo" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_foo_tcp" + "stat_prefix": "terminating_gateway.default.cache.foo" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_foo_tcp" + "stat_prefix": "terminating_gateway.default.db.foo" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_foo_tcp" + "stat_prefix": "terminating_gateway.default.web.foo" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_foo_tcp" + "stat_prefix": "terminating_gateway.foo" } } ] @@ -272,7 +272,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_wan_tcp" + "stat_prefix": "terminating_gateway.default.api.wan" } } ] @@ -319,7 +319,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_wan_tcp" + "stat_prefix": "terminating_gateway.default.cache.wan" } } ] @@ -366,7 +366,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_wan_tcp" + "stat_prefix": "terminating_gateway.default.db.wan" } } ] @@ -413,7 +413,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_wan_tcp" + "stat_prefix": "terminating_gateway.default.web.wan" } } ] @@ -427,7 +427,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_wan_tcp" + "stat_prefix": "terminating_gateway.wan" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-16-x.golden index 0164fc635..6175ab562 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-16-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_foo_tcp" + "stat_prefix": "terminating_gateway.default.api.foo" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_foo_tcp" + "stat_prefix": "terminating_gateway.default.cache.foo" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_foo_tcp" + "stat_prefix": "terminating_gateway.default.db.foo" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_foo_tcp" + "stat_prefix": "terminating_gateway.default.web.foo" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_foo_tcp" + "stat_prefix": "terminating_gateway.foo" } } ] @@ -272,7 +272,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_wan_tcp" + "stat_prefix": "terminating_gateway.default.api.wan" } } ] @@ -319,7 +319,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_wan_tcp" + "stat_prefix": "terminating_gateway.default.cache.wan" } } ] @@ -366,7 +366,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_wan_tcp" + "stat_prefix": "terminating_gateway.default.db.wan" } } ] @@ -413,7 +413,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_wan_tcp" + "stat_prefix": "terminating_gateway.default.web.wan" } } ] @@ -427,7 +427,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_wan_tcp" + "stat_prefix": "terminating_gateway.wan" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden index bfb7ab050..9fadea4d9 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -161,7 +161,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden index bfb7ab050..9fadea4d9 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -161,7 +161,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden index bfb7ab050..9fadea4d9 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -161,7 +161,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-16-x.golden index bfb7ab050..9fadea4d9 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-16-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -161,7 +161,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-13-x.golden index 47c7d163a..437033b6b 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-13-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-14-x.golden index 47c7d163a..437033b6b 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-14-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-15-x.golden index 47c7d163a..437033b6b 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-15-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-16-x.golden index 47c7d163a..437033b6b 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-services.envoy-1-16-x.golden @@ -20,7 +20,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-13-x.golden index 9947e4838..b38648e3e 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-13-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -204,7 +204,7 @@ }, "route_config_name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -266,7 +266,7 @@ }, "route_config_name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -328,7 +328,7 @@ }, "route_config_name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -347,7 +347,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-14-x.golden index 9947e4838..b38648e3e 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-14-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -204,7 +204,7 @@ }, "route_config_name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -266,7 +266,7 @@ }, "route_config_name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -328,7 +328,7 @@ }, "route_config_name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -347,7 +347,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-15-x.golden index 9947e4838..b38648e3e 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-15-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -204,7 +204,7 @@ }, "route_config_name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -266,7 +266,7 @@ }, "route_config_name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -328,7 +328,7 @@ }, "route_config_name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -347,7 +347,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-16-x.golden index 9947e4838..b38648e3e 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-16-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -204,7 +204,7 @@ }, "route_config_name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -266,7 +266,7 @@ }, "route_config_name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -328,7 +328,7 @@ }, "route_config_name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" }, - "stat_prefix": "terminating_gateway_default_web_default_http", + "stat_prefix": "terminating_gateway.default.web.default", "tracing": { "operation_name": "EGRESS", "random_sampling": { @@ -347,7 +347,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden index eba577e6c..173be72c1 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden index eba577e6c..173be72c1 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden index eba577e6c..173be72c1 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-16-x.golden index eba577e6c..173be72c1 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-16-x.golden @@ -53,7 +53,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_api_default_tcp" + "stat_prefix": "terminating_gateway.default.api.default" } } ] @@ -100,7 +100,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_cache_default_tcp" + "stat_prefix": "terminating_gateway.default.cache.default" } } ] @@ -147,7 +147,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_db_default_tcp" + "stat_prefix": "terminating_gateway.default.db.default" } } ] @@ -194,7 +194,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", - "stat_prefix": "terminating_gateway_default_web_default_tcp" + "stat_prefix": "terminating_gateway.default.web.default" } } ] @@ -208,7 +208,7 @@ "name": "envoy.tcp_proxy", "config": { "cluster": "", - "stat_prefix": "terminating_gateway_default_tcp" + "stat_prefix": "terminating_gateway.default" } } ] diff --git a/api/api.go b/api/api.go index 4de3e77c8..08f00c406 100644 --- a/api/api.go +++ b/api/api.go @@ -310,7 +310,7 @@ type Config struct { TokenFile string // Namespace is the name of the namespace to send along for the request - // when no other Namespace ispresent in the QueryOptions + // when no other Namespace is present in the QueryOptions Namespace string TLSConfig TLSConfig diff --git a/command/connect/envoy/bootstrap_config.go b/command/connect/envoy/bootstrap_config.go index f2d696e21..99c2b1f1a 100644 --- a/command/connect/envoy/bootstrap_config.go +++ b/command/connect/envoy/bootstrap_config.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "github.com/hashicorp/consul/api" "net" "net/url" "os" @@ -157,8 +158,8 @@ func (c *BootstrapConfig) Template() string { return bootstrapTemplate } -func (c *BootstrapConfig) GenerateJSON(args *BootstrapTplArgs) ([]byte, error) { - if err := c.ConfigureArgs(args); err != nil { +func (c *BootstrapConfig) GenerateJSON(args *BootstrapTplArgs, omitDeprecatedTags bool) ([]byte, error) { + if err := c.ConfigureArgs(args, omitDeprecatedTags); err != nil { return nil, err } t, err := template.New("bootstrap").Parse(c.Template()) @@ -182,7 +183,7 @@ func (c *BootstrapConfig) GenerateJSON(args *BootstrapTplArgs) ([]byte, error) { // ConfigureArgs takes the basic template arguments generated from the command // arguments and environment and modifies them according to the BootstrapConfig. -func (c *BootstrapConfig) ConfigureArgs(args *BootstrapTplArgs) error { +func (c *BootstrapConfig) ConfigureArgs(args *BootstrapTplArgs, omitDeprecatedTags bool) error { // Attempt to setup sink(s) from high-level config. Note the args are passed // by ref and modified in place. @@ -196,9 +197,11 @@ func (c *BootstrapConfig) ConfigureArgs(args *BootstrapTplArgs) error { } else { // Attempt to setup tags from high-level config. Note the args are passed by // ref and modified in place. - if err := c.generateStatsConfig(args); err != nil { + stats, err := generateStatsTags(args, c.StatsTags, omitDeprecatedTags) + if err != nil { return err } + args.StatsConfigJSON = formatStatsTags(stats) } if c.StaticClustersJSON != "" { @@ -305,36 +308,127 @@ func (c *BootstrapConfig) generateStatsSinkJSON(name string, addr string) (strin }`, nil } -var sniTagJSONs []string +// resourceTagSpecifiers returns patterns used to generate tags from cluster and filter metric names. +func resourceTagSpecifiers(omitDeprecatedTags bool) ([]string, error) { + const ( + reSegment = `[^.]+` + ) -func init() { - // ......consul - // - cluster.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 - // - cluster.f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 - // - cluster.v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 - // - cluster.f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 - const PART = `[^.]+` + // For all rules: + // - The outer capture group is removed from the final metric name. + // - The inner capture group is extracted into labels. rules := [][]string{ - {"consul.custom_hash", - fmt.Sprintf(`^cluster\.((?:(%s)~)?(?:%s\.)?%s\.%s\.%s\.%s\.%s\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, - {"consul.service_subset", - fmt.Sprintf(`^cluster\.((?:%s~)?(?:(%s)\.)?%s\.%s\.%s\.%s\.%s\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, - {"consul.service", - fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?(%s)\.%s\.%s\.%s\.%s\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, - {"consul.namespace", - fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.(%s)\.%s\.%s\.%s\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, - {"consul.datacenter", - fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.(%s)\.%s\.%s\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, - {"consul.routing_type", - fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.%s\.(%s)\.%s\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, // internal:true/false would be idea - {"consul.trust_domain", - fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.%s\.%s\.(%s)\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, - {"consul.target", - fmt.Sprintf(`^cluster\.(((?:%s~)?(?:%s\.)?%s\.%s\.%s)\.%s\.%s\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, - {"consul.full_target", - fmt.Sprintf(`^cluster\.(((?:%s~)?(?:%s\.)?%s\.%s\.%s\.%s\.%s)\.consul\.)`, PART, PART, PART, PART, PART, PART, PART)}, + // Cluster metrics are prefixed by consul.destination + // + // Cluster metric name format: + // ......consul + // + // Examples: + // - cluster.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 + // - cluster.f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 + // - cluster.v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 + // - cluster.f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors: 0 + {"consul.destination.custom_hash", + fmt.Sprintf(`^cluster\.((?:(%s)~)?(?:%s\.)?%s\.%s\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.service_subset", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:(%s)\.)?%s\.%s\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.service", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?(%s)\.%s\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.namespace", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.(%s)\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.datacenter", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.(%s)\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.routing_type", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.%s\.(%s)\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.trust_domain", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.%s\.%s\.(%s)\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.target", + fmt.Sprintf(`^cluster\.(((?:%s~)?(?:%s\.)?%s\.%s\.%s)\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.destination.full_target", + fmt.Sprintf(`^cluster\.(((?:%s~)?(?:%s\.)?%s\.%s\.%s\.%s\.%s)\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + // Upstream listener metrics are prefixed by consul.upstream + // + // Listener metric name format: + // .upstream... + // + // Examples: + // - tcp.upstream.db.dc1.downstream_cx_total: 0 + // - http.upstream.web.default.dc1.downstream_cx_total: 0 + {"consul.upstream.service", + fmt.Sprintf(`^(?:tcp|http)\.upstream\.((%s)(?:\.%s)?\.%s\.)`, + reSegment, reSegment, reSegment)}, + + {"consul.upstream.datacenter", + fmt.Sprintf(`^(?:tcp|http)\.upstream\.(%s(?:\.%s)?\.(%s)\.)`, + reSegment, reSegment, reSegment)}, + + {"consul.upstream.namespace", + fmt.Sprintf(`^(?:tcp|http)\.upstream\.(%s(?:\.(%s))?\.%s\.)`, + reSegment, reSegment, reSegment)}, } + // These tags were deprecated in Consul 1.9.0 + // We are leaving them enabled by default for backwards compatibility + if !omitDeprecatedTags { + deprecatedRules := [][]string{ + {"consul.custom_hash", + fmt.Sprintf(`^cluster\.((?:(%s)~)?(?:%s\.)?%s\.%s\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.service_subset", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:(%s)\.)?%s\.%s\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.service", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?(%s)\.%s\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.namespace", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.(%s)\.%s\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.datacenter", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.(%s)\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.routing_type", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.%s\.(%s)\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.trust_domain", + fmt.Sprintf(`^cluster\.((?:%s~)?(?:%s\.)?%s\.%s\.%s\.%s\.(%s)\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.target", + fmt.Sprintf(`^cluster\.(((?:%s~)?(?:%s\.)?%s\.%s\.%s)\.%s\.%s\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + + {"consul.full_target", + fmt.Sprintf(`^cluster\.(((?:%s~)?(?:%s\.)?%s\.%s\.%s\.%s\.%s)\.consul\.)`, + reSegment, reSegment, reSegment, reSegment, reSegment, reSegment, reSegment)}, + } + rules = append(rules, deprecatedRules...) + } + + var tags []string for _, rule := range rules { m := map[string]string{ "tag_name": rule[0], @@ -342,24 +436,35 @@ func init() { } d, err := json.Marshal(m) if err != nil { - panic("error pregenerating SNI envoy tags: " + err.Error()) + return nil, err } - sniTagJSONs = append(sniTagJSONs, string(d)) + tags = append(tags, string(d)) } + return tags, nil } -func (c *BootstrapConfig) generateStatsConfig(args *BootstrapTplArgs) error { - var tagJSONs []string - - // Add some default tags if not already overridden - defaults := map[string]string{ - "local_cluster": args.ProxyCluster, +func formatStatsTags(tags []string) string { + var output string + if len(tags) > 0 { + // use_all_default_tags is true by default but we'll make it explicit! + output = `{ + "stats_tags": [ + ` + strings.Join(tags, ",\n") + ` + ], + "use_all_default_tags": true + }` } + return output +} - // Explode SNI portions. - tagJSONs = append(tagJSONs, sniTagJSONs...) +func generateStatsTags(args *BootstrapTplArgs, initialTags []string, omitDeprecatedTags bool) ([]string, error) { + var ( + // Track tags we are setting explicitly to exclude them from defaults + tagNames = make(map[string]struct{}) + tagJSONs []string + ) - for _, tag := range c.StatsTags { + for _, tag := range initialTags { parts := strings.SplitN(tag, "=", 2) // If there is no equals, treat it as a boolean tag and just assign value of // 1 e.g. "canary" will out put the tag "canary: 1" @@ -373,33 +478,65 @@ func (c *BootstrapConfig) generateStatsConfig(args *BootstrapTplArgs) error { "fixed_value": "` + v + `" }` tagJSONs = append(tagJSONs, tagJSON) - // Remove this in case we override a default - delete(defaults, k) + tagNames[k] = struct{}{} } - for k, v := range defaults { - if v == "" { - // Skip stuff we just didn't have data for, this is only really the case - // in tests currently. + // Explode listener and cluster portions. + tags, err := resourceTagSpecifiers(omitDeprecatedTags) + if err != nil { + return nil, fmt.Errorf("failed to generate resource-specific envoy tags: %v", err) + } + tagJSONs = append(tagJSONs, tags...) + + // Default the namespace here since it is also done for cluster SNI + ns := args.Namespace + if ns == "" { + ns = api.IntentionDefaultNamespace + } + + // Add some default tags if not already overridden. Note this is a slice not a + // map since we need ordering to be deterministic. + defaults := []struct { + name string + val string + }{ + // local_cluster is for backwards compatibility. We originally choose this + // name as it matched a few other Envoy metrics examples given in docs but + // it's a little confusing in context of setting up metrics dashboards. + { + name: "local_cluster", + val: args.ProxyCluster, + }, + { + name: "consul.source.service", + val: args.ProxySourceService, + }, + { + name: "consul.source.namespace", + val: ns, + }, + { + name: "consul.source.datacenter", + val: args.Datacenter, + }, + } + + for _, kv := range defaults { + if kv.val == "" { + // Skip stuff we just didn't have data for. + continue + } + if _, ok := tagNames[kv.name]; ok { + // Skip anything already set explicitly. continue } tagJSON := `{ - "tag_name": "` + k + `", - "fixed_value": "` + v + `" + "tag_name": "` + kv.name + `", + "fixed_value": "` + kv.val + `" }` tagJSONs = append(tagJSONs, tagJSON) } - - if len(tagJSONs) > 0 { - // use_all_default_tags is true by default but we'll make it explicit! - args.StatsConfigJSON = `{ - "stats_tags": [ - ` + strings.Join(tagJSONs, ",\n") + ` - ], - "use_all_default_tags": true - }` - } - return nil + return tagJSONs, nil } func (c *BootstrapConfig) generateListenerConfig(args *BootstrapTplArgs, bindAddr, name, matchType, matchValue, prefixRewrite string) error { diff --git a/command/connect/envoy/bootstrap_config_test.go b/command/connect/envoy/bootstrap_config_test.go index d6d33d13f..92c64e6c5 100644 --- a/command/connect/envoy/bootstrap_config_test.go +++ b/command/connect/envoy/bootstrap_config_test.go @@ -1,10 +1,13 @@ package envoy import ( + "encoding/json" "reflect" + "regexp" "strings" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -197,21 +200,26 @@ const ( ) func TestBootstrapConfig_ConfigureArgs(t *testing.T) { - sniTagJSON := strings.Join(sniTagJSONs, ",\n") - defaultStatsConfigJSON := `{ - "stats_tags": [ - ` + sniTagJSON + ` - ], - "use_all_default_tags": true - }` + defaultTags, err := generateStatsTags(&BootstrapTplArgs{}, nil, false) + require.NoError(t, err) + + defaultTagsJSON := strings.Join(defaultTags, ",\n") + defaultStatsConfigJSON := formatStatsTags(defaultTags) + + // The updated tags exclude the ones deprecated in Consul 1.9 + updatedTags, err := generateStatsTags(&BootstrapTplArgs{}, nil, true) + require.NoError(t, err) + + updatedStatsConfigJSON := formatStatsTags(updatedTags) tests := []struct { - name string - input BootstrapConfig - env []string - baseArgs BootstrapTplArgs - wantArgs BootstrapTplArgs - wantErr bool + name string + input BootstrapConfig + env []string + baseArgs BootstrapTplArgs + wantArgs BootstrapTplArgs + omitDeprecatedTags bool + wantErr bool }{ { name: "defaults", @@ -403,7 +411,6 @@ func TestBootstrapConfig_ConfigureArgs(t *testing.T) { wantArgs: BootstrapTplArgs{ StatsConfigJSON: `{ "stats_tags": [ - ` + sniTagJSON + `, { "tag_name": "canary", "fixed_value": "1" @@ -415,7 +422,8 @@ func TestBootstrapConfig_ConfigureArgs(t *testing.T) { { "tag_name": "baz", "fixed_value": "2" - } + }, + ` + defaultTagsJSON + ` ], "use_all_default_tags": true }`, @@ -623,6 +631,31 @@ func TestBootstrapConfig_ConfigureArgs(t *testing.T) { }, wantErr: false, }, + { + name: "omit-deprecated-tags", + input: BootstrapConfig{ + ReadyBindAddr: "0.0.0.0:4444", + PrometheusBindAddr: "0.0.0.0:9000", + StatsBindAddr: "0.0.0.0:9000", + }, + baseArgs: BootstrapTplArgs{ + AdminBindAddress: "127.0.0.1", + AdminBindPort: "19000", + }, + omitDeprecatedTags: true, + wantArgs: BootstrapTplArgs{ + AdminBindAddress: "127.0.0.1", + AdminBindPort: "19000", + StaticClustersJSON: expectedSelfAdminCluster, + StaticListenersJSON: strings.Join( + []string{expectedPromListener, expectedStatsListener, expectedReadyListener}, + ", ", + ), + // Should not have default stats config JSON when deprecated tags are omitted + StatsConfigJSON: updatedStatsConfigJSON, + }, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -630,7 +663,7 @@ func TestBootstrapConfig_ConfigureArgs(t *testing.T) { defer testSetAndResetEnv(t, tt.env)() - err := tt.input.ConfigureArgs(&args) + err := tt.input.ConfigureArgs(&args, tt.omitDeprecatedTags) if tt.wantErr { require.Error(t, err) } else { @@ -659,3 +692,259 @@ func TestBootstrapConfig_ConfigureArgs(t *testing.T) { }) } } + +func TestConsulTagSpecifiers(t *testing.T) { + // Conveniently both envoy and Go use the re2 dialect of regular + // expressions, so we can actually test the stats tag extraction regular + // expressions right here! + + specs, err := resourceTagSpecifiers(false) + require.NoError(t, err) + + specsNoDeprecated, err := resourceTagSpecifiers(true) + require.NoError(t, err) + + type testPattern struct { + name string + r *regexp.Regexp + } + + parseSpecs := func(specs []string) []testPattern { + var patterns []testPattern + for _, spec := range specs { + var m struct { + TagName string `json:"tag_name"` + Regex string `json:"regex"` + } + require.NoError(t, json.Unmarshal([]byte(spec), &m)) + + patterns = append(patterns, testPattern{ + name: m.TagName, + r: regexp.MustCompile(m.Regex), + }) + } + return patterns + } + + var ( + patterns = parseSpecs(specs) + patternsNoDeprecated = parseSpecs(specsNoDeprecated) + ) + + type testcase struct { + name string + stat string + expect map[string][]string // this is the m[1:] of the match + expectNoDeprecated map[string][]string // this is the m[1:] of the match + } + + cases := []testcase{ + { + name: "cluster service", + stat: "cluster.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors", + expect: map[string][]string{ + "consul.custom_hash": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.datacenter": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.custom_hash": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.datacenter": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.target": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong.default.dc2"}, + "consul.destination.trust_domain": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.full_target": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.namespace": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.routing_type": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.service": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.service_subset": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.target": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong.default.dc2"}, + "consul.trust_domain": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + expectNoDeprecated: map[string][]string{ + "consul.destination.custom_hash": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.datacenter": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.target": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong.default.dc2"}, + "consul.destination.trust_domain": {"pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + }, + { + name: "cluster custom service", + stat: "cluster.f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors", + expect: map[string][]string{ + "consul.custom_hash": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8"}, + "consul.datacenter": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.custom_hash": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8"}, + "consul.destination.datacenter": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.target": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~pong.default.dc2"}, + "consul.destination.trust_domain": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.full_target": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.namespace": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.routing_type": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.service": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.service_subset": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.target": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~pong.default.dc2"}, + "consul.trust_domain": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + expectNoDeprecated: map[string][]string{ + "consul.destination.custom_hash": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8"}, + "consul.destination.datacenter": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.target": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~pong.default.dc2"}, + "consul.destination.trust_domain": {"f8f8f8f8~pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + }, + { + name: "cluster service subset", + stat: "cluster.v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors", + expect: map[string][]string{ + "consul.custom_hash": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.datacenter": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.custom_hash": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.datacenter": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2"}, + "consul.destination.target": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2.pong.default.dc2"}, + "consul.destination.trust_domain": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.full_target": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.namespace": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.routing_type": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.service": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.service_subset": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2"}, + "consul.target": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2.pong.default.dc2"}, + "consul.trust_domain": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + expectNoDeprecated: map[string][]string{ + "consul.destination.custom_hash": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", ""}, + "consul.destination.datacenter": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2"}, + "consul.destination.target": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2.pong.default.dc2"}, + "consul.destination.trust_domain": {"v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + }, + { + name: "cluster custom service subset", + stat: "cluster.f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors", + expect: map[string][]string{ + "consul.custom_hash": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8"}, + "consul.datacenter": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.custom_hash": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8"}, + "consul.destination.datacenter": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2"}, + "consul.destination.target": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~v2.pong.default.dc2"}, + "consul.destination.trust_domain": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.full_target": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.namespace": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.routing_type": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.service": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.service_subset": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2"}, + "consul.target": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~v2.pong.default.dc2"}, + "consul.trust_domain": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + expectNoDeprecated: map[string][]string{ + "consul.destination.custom_hash": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8"}, + "consul.destination.datacenter": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "dc2"}, + "consul.destination.full_target": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648"}, + "consul.destination.namespace": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "default"}, + "consul.destination.routing_type": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "internal"}, + "consul.destination.service": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "pong"}, + "consul.destination.service_subset": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "v2"}, + "consul.destination.target": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "f8f8f8f8~v2.pong.default.dc2"}, + "consul.destination.trust_domain": {"f8f8f8f8~v2.pong.default.dc2.internal.e5b08d03-bfc3-c870-1833-baddb116e648.consul.", "e5b08d03-bfc3-c870-1833-baddb116e648"}, + }, + }, + { + name: "tcp listener no namespace", + stat: "tcp.upstream.db.dc1.downstream_cx_total", + expect: map[string][]string{ + "consul.upstream.datacenter": {"db.dc1.", "dc1"}, + "consul.upstream.namespace": {"db.dc1.", ""}, + "consul.upstream.service": {"db.dc1.", "db"}, + }, + }, + { + name: "tcp listener with namespace", + stat: "tcp.upstream.db.default.dc1.downstream_cx_total", + expect: map[string][]string{ + "consul.upstream.datacenter": {"db.default.dc1.", "dc1"}, + "consul.upstream.namespace": {"db.default.dc1.", "default"}, + "consul.upstream.service": {"db.default.dc1.", "db"}, + }, + }, + { + name: "http listener no namespace", + stat: "http.upstream.web.dc1.downstream_cx_total", + expect: map[string][]string{ + "consul.upstream.datacenter": {"web.dc1.", "dc1"}, + "consul.upstream.namespace": {"web.dc1.", ""}, + "consul.upstream.service": {"web.dc1.", "web"}, + }, + }, + { + name: "http listener with namespace", + stat: "http.upstream.web.default.dc1.downstream_cx_total", + expect: map[string][]string{ + "consul.upstream.datacenter": {"web.default.dc1.", "dc1"}, + "consul.upstream.namespace": {"web.default.dc1.", "default"}, + "consul.upstream.service": {"web.default.dc1.", "web"}, + }, + }, + } + + for _, tc := range cases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + var ( + got = make(map[string][]string) + gotNoDeprecated = make(map[string][]string) + ) + for _, p := range patterns { + m := p.r.FindStringSubmatch(tc.stat) + if len(m) > 1 { + m = m[1:] + got[p.name] = m + } + } + for _, p := range patternsNoDeprecated { + m := p.r.FindStringSubmatch(tc.stat) + if len(m) > 1 { + m = m[1:] + gotNoDeprecated[p.name] = m + } + } + + if tc.expectNoDeprecated == nil { + tc.expectNoDeprecated = tc.expect + } + + assert.Equal(t, tc.expect, got) + assert.Equal(t, tc.expectNoDeprecated, gotNoDeprecated) + }) + } +} diff --git a/command/connect/envoy/bootstrap_tpl.go b/command/connect/envoy/bootstrap_tpl.go index cc093b96e..b73f5e2bb 100644 --- a/command/connect/envoy/bootstrap_tpl.go +++ b/command/connect/envoy/bootstrap_tpl.go @@ -14,6 +14,12 @@ type BootstrapTplArgs struct { // the agent to deliver the correct configuration. ProxyID string + // ProxySourceService is the Consul service name to report for this proxy + // instance's source service label. For sidecars it should be the + // Proxy.DestinationServiceName. For gateways and similar it is the service + // name of the proxy service itself. + ProxySourceService string + // AgentCAPEM is the CA to use to verify the local agent gRPC service if // TLS is enabled. AgentCAPEM string @@ -79,10 +85,13 @@ type BootstrapTplArgs struct { // See https://www.envoyproxy.io/docs/envoy/v1.9.0/api-v2/config/trace/v2/trace.proto. TracingConfigJSON string - // Namespace is the Consul Enterprise Namespace of the proxy service instance as - // registered with the Consul agent. + // Namespace is the Consul Enterprise Namespace of the proxy service instance + // as registered with the Consul agent. Namespace string + // Datacenter is the datacenter where the proxy service instance is registered. + Datacenter string + // EnvoyVersion is the envoy version, which is necessary to generate the // correct configuration. EnvoyVersion string diff --git a/command/connect/envoy/envoy.go b/command/connect/envoy/envoy.go index 67530f0ec..6e2953ae3 100644 --- a/command/connect/envoy/envoy.go +++ b/command/connect/envoy/envoy.go @@ -4,6 +4,7 @@ import ( "errors" "flag" "fmt" + "io" "net" "os" "os/exec" @@ -30,7 +31,10 @@ func New(ui cli.Ui) *cmd { Ui: ui, } - c := &cmd{UI: ui} + c := &cmd{ + UI: ui, + directOut: os.Stdout, + } c.init() return c } @@ -43,6 +47,9 @@ type cmd struct { http *flags.HTTPFlags help string client *api.Client + // DirectOut defaults to os.stdout but is a property to allow capture during + // tests to have more useful output. + directOut io.Writer // flags meshGateway bool @@ -64,6 +71,7 @@ type cmd struct { deregAfterCritical string bindAddresses ServiceAddressMapValue exposeServers bool + omitDeprecatedTags bool gatewaySvcName string gatewayKind api.ServiceKind @@ -152,6 +160,11 @@ func (c *cmd) init() { c.flags.StringVar(&c.deregAfterCritical, "deregister-after-critical", "6h", "The amount of time the gateway services health check can be failing before being deregistered") + c.flags.BoolVar(&c.omitDeprecatedTags, "omit-deprecated-tags", false, + "In Consul 1.9.0 the format of metric tags for Envoy clusters was updated from consul.[service|dc|...] to "+ + "consul.destination.[service|dc|...]. The old tags were preserved for backward compatibility,"+ + "but can be disabled with this flag.") + c.http = &flags.HTTPFlags{} flags.Merge(c.flags, c.http.ClientFlags()) flags.Merge(c.flags, c.http.NamespaceFlags()) @@ -364,7 +377,7 @@ func (c *cmd) run(args []string) int { if c.bootstrap { // Just output it and we are done - os.Stdout.Write(bootstrapJson) + c.directOut.Write(bootstrapJson) return 0 } @@ -431,10 +444,13 @@ func (c *cmd) templateArgs() (*BootstrapTplArgs, error) { // know service name yet, we will after we resolve the proxy's config in a bit // and will update this then. cluster := c.proxyID + proxySourceService := "" if c.sidecarFor != "" { cluster = c.sidecarFor + proxySourceService = c.sidecarFor } else if c.gateway != "" && c.gatewaySvcName != "" { cluster = c.gatewaySvcName + proxySourceService = c.gatewaySvcName } adminAccessLogPath := c.adminAccessLogPath @@ -453,6 +469,7 @@ func (c *cmd) templateArgs() (*BootstrapTplArgs, error) { GRPC: grpcAddr, ProxyCluster: cluster, ProxyID: c.proxyID, + ProxySourceService: proxySourceService, AgentCAPEM: caPEM, AdminAccessLogPath: adminAccessLogPath, AdminBindAddress: adminBindIP.String(), @@ -483,29 +500,53 @@ func (c *cmd) generateConfig() ([]byte, error) { bsCfg.ReadyBindAddr = lanAddr } + // Fetch any customization from the registration + svc, _, err := c.client.Agent().Service(c.proxyID, nil) + if err != nil { + return nil, fmt.Errorf("failed fetch proxy config from local agent: %s", err) + } + if svc.Proxy == nil { + return nil, errors.New("service is not a Connect proxy or gateway") + } + + if svc.Proxy.DestinationServiceName != "" { + // Override cluster now we know the actual service name + args.ProxyCluster = svc.Proxy.DestinationServiceName + args.ProxySourceService = svc.Proxy.DestinationServiceName + } else { + // Set the source service name from the proxy's own registration + args.ProxySourceService = svc.Service + } + if svc.Namespace != "" { + // In most cases where namespaces are enabled this will already be set + // correctly because the http client that fetched this will need to have + // had the namespace set on it which is also how we initially populate + // this. However in the case of "default" namespace being accessed because + // there was no namespace argument, args.Namespace will be empty even + // though Namespaces are actually being used and the namespace of the request was + // inferred from the ACL token or defaulted to the "default" namespace. + // Overriding it here ensures that we always set the Namespace arg if the + // cluster is using namespaces regardless. + args.Namespace = svc.Namespace + } + agent, err := c.client.Agent().Self() + if err != nil { + return nil, fmt.Errorf("failed to fetch agent config: %v", err) + } + dc, ok := agent["Config"]["Datacenter"].(string) + if !ok { + return nil, fmt.Errorf("failed to fetch datacenter from agent. DC is: %T", agent["Config"]["Datacenter"]) + } + args.Datacenter = dc + if !c.disableCentralConfig { - // Fetch any customization from the registration - svc, _, err := c.client.Agent().Service(c.proxyID, nil) - if err != nil { - return nil, fmt.Errorf("failed fetch proxy config from local agent: %s", err) - } - - if svc.Proxy == nil { - return nil, errors.New("service is not a Connect proxy or gateway") - } - // Parse the bootstrap config if err := mapstructure.WeakDecode(svc.Proxy.Config, &bsCfg); err != nil { return nil, fmt.Errorf("failed parsing Proxy.Config: %s", err) } - - if svc.Proxy.DestinationServiceName != "" { - // Override cluster now we know the actual service name - args.ProxyCluster = svc.Proxy.DestinationServiceName - } } - return bsCfg.GenerateJSON(args) + return bsCfg.GenerateJSON(args, c.omitDeprecatedTags) } // TODO: make method a function diff --git a/command/connect/envoy/envoy_oss_test.go b/command/connect/envoy/envoy_oss_test.go new file mode 100644 index 000000000..3c519cd46 --- /dev/null +++ b/command/connect/envoy/envoy_oss_test.go @@ -0,0 +1,9 @@ +// +build !consulent + +package envoy + +// enterpriseGenerateConfigTestCases returns enterprise-only configurations to +// test in TestGenerateConfig. +func enterpriseGenerateConfigTestCases() []generateConfigTestCase { + return nil +} diff --git a/command/connect/envoy/envoy_test.go b/command/connect/envoy/envoy_test.go index cab2ae9ad..9d0b03704 100644 --- a/command/connect/envoy/envoy_test.go +++ b/command/connect/envoy/envoy_test.go @@ -1,6 +1,7 @@ package envoy import ( + "bytes" "encoding/json" "flag" "io/ioutil" @@ -103,21 +104,24 @@ func testSetAndResetEnv(t *testing.T, env []string) func() { } } +type generateConfigTestCase struct { + Name string + Flags []string + Env []string + Files map[string]string + ProxyConfig map[string]interface{} + NamespacesEnabled bool + GRPCPort int // only used for testing custom-configured grpc port + WantArgs BootstrapTplArgs + WantErr string +} + // This tests the args we use to generate the template directly because they // encapsulate all the argument and default handling code which is where most of // the logic is. We also allow generating golden files but only for cases that // pass the test of having their template args generated as expected. func TestGenerateConfig(t *testing.T) { - cases := []struct { - Name string - Flags []string - Env []string - Files map[string]string - ProxyConfig map[string]interface{} - GRPCPort int // only used for testing custom-configured grpc port - WantArgs BootstrapTplArgs - WantErr string - }{ + cases := []generateConfigTestCase{ { Name: "no-args", Flags: []string{}, @@ -131,6 +135,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", // Note this is the gRPC port @@ -149,6 +156,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", // Note this is the gRPC port @@ -170,6 +180,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", // Note this is the gRPC port @@ -193,6 +206,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", // Note this is the gRPC port @@ -217,6 +233,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", // Note this is the gRPC port @@ -236,6 +255,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -259,6 +281,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -280,6 +305,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentSocket: "/var/run/consul.sock", }, @@ -297,6 +325,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -317,6 +348,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -337,6 +371,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -355,6 +392,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -377,6 +417,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -395,6 +438,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -439,6 +485,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -473,6 +522,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -512,6 +564,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -538,6 +593,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -594,6 +652,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -612,6 +673,9 @@ func TestGenerateConfig(t *testing.T) { EnvoyVersion: defaultEnvoyVersion, ProxyCluster: "test-proxy", ProxyID: "test-proxy", + // We don't know this til after the lookup so it will be empty in the + // initial args call we are testing here. + ProxySourceService: "", // Should resolve IP, note this might not resolve the same way // everywhere which might make this test brittle but not sure what else // to do. @@ -630,9 +694,10 @@ func TestGenerateConfig(t *testing.T) { Name: "ingress-gateway", Flags: []string{"-proxy-id", "ingress-gateway-1", "-gateway", "ingress"}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: defaultEnvoyVersion, - ProxyCluster: "ingress-gateway", - ProxyID: "ingress-gateway-1", + EnvoyVersion: defaultEnvoyVersion, + ProxyCluster: "ingress-gateway", + ProxyID: "ingress-gateway-1", + ProxySourceService: "ingress-gateway", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -647,9 +712,10 @@ func TestGenerateConfig(t *testing.T) { Name: "ingress-gateway-address-specified", Flags: []string{"-proxy-id", "ingress-gateway", "-gateway", "ingress", "-address", "1.2.3.4:7777"}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: defaultEnvoyVersion, - ProxyCluster: "ingress-gateway", - ProxyID: "ingress-gateway", + EnvoyVersion: defaultEnvoyVersion, + ProxyCluster: "ingress-gateway", + ProxyID: "ingress-gateway", + ProxySourceService: "ingress-gateway", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -664,9 +730,10 @@ func TestGenerateConfig(t *testing.T) { Name: "ingress-gateway-register-with-service-without-proxy-id", Flags: []string{"-gateway", "ingress", "-register", "-service", "my-gateway", "-address", "127.0.0.1:7777"}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: defaultEnvoyVersion, - ProxyCluster: "my-gateway", - ProxyID: "my-gateway", + EnvoyVersion: defaultEnvoyVersion, + ProxyCluster: "my-gateway", + ProxyID: "my-gateway", + ProxySourceService: "my-gateway", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -681,9 +748,10 @@ func TestGenerateConfig(t *testing.T) { Name: "ingress-gateway-register-with-service-and-proxy-id", Flags: []string{"-gateway", "ingress", "-register", "-service", "my-gateway", "-proxy-id", "my-gateway-123", "-address", "127.0.0.1:7777"}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: defaultEnvoyVersion, - ProxyCluster: "my-gateway", - ProxyID: "my-gateway-123", + EnvoyVersion: defaultEnvoyVersion, + ProxyCluster: "my-gateway", + ProxyID: "my-gateway-123", + ProxySourceService: "my-gateway", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -698,9 +766,10 @@ func TestGenerateConfig(t *testing.T) { Name: "ingress-gateway-no-auto-register", Flags: []string{"-gateway", "ingress", "-address", "127.0.0.1:7777"}, WantArgs: BootstrapTplArgs{ - EnvoyVersion: defaultEnvoyVersion, - ProxyCluster: "ingress-gateway", - ProxyID: "ingress-gateway", + EnvoyVersion: defaultEnvoyVersion, + ProxyCluster: "ingress-gateway", + ProxyID: "ingress-gateway", + ProxySourceService: "ingress-gateway", GRPC: GRPC{ AgentAddress: "127.0.0.1", AgentPort: "8502", @@ -713,6 +782,8 @@ func TestGenerateConfig(t *testing.T) { }, } + cases = append(cases, enterpriseGenerateConfigTestCases()...) + copyAndReplaceAll := func(s []string, old, new string) []string { out := make([]string, len(s)) for i, v := range s { @@ -736,7 +807,7 @@ func TestGenerateConfig(t *testing.T) { // Run a mock agent API that just always returns the proxy config in the // test. - srv := httptest.NewServer(testMockAgent(tc.ProxyConfig, tc.GRPCPort)) + srv := httptest.NewServer(testMockAgent(tc.ProxyConfig, tc.GRPCPort, tc.NamespacesEnabled)) defer srv.Close() client, err := api.NewClient(&api.Config{Address: srv.URL}) require.NoError(err) @@ -750,6 +821,11 @@ func TestGenerateConfig(t *testing.T) { // explicitly set the client to one which can connect to the httptest.Server c.client = client + var outBuf bytes.Buffer + // Capture output since it clutters test output and we can assert on what + // was actually printed this way. + c.directOut = &outBuf + // Run the command myFlags := copyAndReplaceAll(tc.Flags, "@@TEMPDIR@@", testDirPrefix) args := append([]string{"-bootstrap"}, myFlags...) @@ -770,10 +846,7 @@ func TestGenerateConfig(t *testing.T) { require.NoError(err) // Error cases should have returned above require.Equal(&tc.WantArgs, got) - // Actual template output goes to stdout direct to avoid prefix in UI, so - // generate it again here to assert on. - actual, err := c.generateConfig() - require.NoError(err) + actual := outBuf.Bytes() // If we got the arg handling write, verify output golden := filepath.Join("testdata", tc.Name+".golden") @@ -880,15 +953,15 @@ func TestEnvoy_GatewayRegistration(t *testing.T) { // testMockAgent combines testMockAgentProxyConfig and testMockAgentSelf, // routing /agent/service/... requests to testMockAgentProxyConfig and // routing /agent/self requests to testMockAgentSelf. -func testMockAgent(agentCfg map[string]interface{}, grpcPort int) http.HandlerFunc { +func testMockAgent(agentCfg map[string]interface{}, grpcPort int, namespacesEnabled bool) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if strings.Contains(r.URL.Path, "/agent/services") { - testMockAgentGatewayConfig()(w, r) + testMockAgentGatewayConfig(namespacesEnabled)(w, r) return } if strings.Contains(r.URL.Path, "/agent/service") { - testMockAgentProxyConfig(agentCfg)(w, r) + testMockAgentProxyConfig(agentCfg, namespacesEnabled)(w, r) return } @@ -901,7 +974,7 @@ func testMockAgent(agentCfg map[string]interface{}, grpcPort int) http.HandlerFu }) } -func testMockAgentGatewayConfig() http.HandlerFunc { +func testMockAgentGatewayConfig(namespacesEnabled bool) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // Parse the proxy-id from the end of the URL (blindly assuming it's correct // format) @@ -924,6 +997,10 @@ func testMockAgentGatewayConfig() http.HandlerFunc { }, } + if namespacesEnabled { + svc[string(kind)].Namespace = namespaceFromQuery(r) + } + cfgJSON, err := json.Marshal(svc) if err != nil { w.WriteHeader(500) @@ -934,7 +1011,16 @@ func testMockAgentGatewayConfig() http.HandlerFunc { }) } -func testMockAgentProxyConfig(cfg map[string]interface{}) http.HandlerFunc { +func namespaceFromQuery(r *http.Request) string { + // Use the namespace in the request if there is one, otherwise + // use-default. + if queryNs := r.URL.Query().Get("ns"); queryNs != "" { + return queryNs + } + return "default" +} + +func testMockAgentProxyConfig(cfg map[string]interface{}, namespacesEnabled bool) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // Parse the proxy-id from the end of the URL (blindly assuming it's correct // format) @@ -952,6 +1038,10 @@ func testMockAgentProxyConfig(cfg map[string]interface{}) http.HandlerFunc { }, } + if namespacesEnabled { + svc.Namespace = namespaceFromQuery(r) + } + cfgJSON, err := json.Marshal(svc) if err != nil { w.WriteHeader(500) @@ -1063,6 +1153,9 @@ func TestEnvoyCommand_canBindInternal(t *testing.T) { func testMockAgentSelf(wantGRPCPort int) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { resp := agent.Self{ + Config: map[string]interface{}{ + "Datacenter": "dc1", + }, DebugConfig: map[string]interface{}{ "GRPCPort": wantGRPCPort, }, diff --git a/command/connect/envoy/testdata/CONSUL_HTTP_ADDR-with-https-scheme-enables-tls.golden b/command/connect/envoy/testdata/CONSUL_HTTP_ADDR-with-https-scheme-enables-tls.golden index a2fdad254..e1e0547bb 100644 --- a/command/connect/envoy/testdata/CONSUL_HTTP_ADDR-with-https-scheme-enables-tls.golden +++ b/command/connect/envoy/testdata/CONSUL_HTTP_ADDR-with-https-scheme-enables-tls.golden @@ -45,6 +45,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -84,6 +132,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/access-log-path.golden b/command/connect/envoy/testdata/access-log-path.golden index c8d20d890..096837c16 100644 --- a/command/connect/envoy/testdata/access-log-path.golden +++ b/command/connect/envoy/testdata/access-log-path.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/defaults.golden b/command/connect/envoy/testdata/defaults.golden index c57783605..3b360404d 100644 --- a/command/connect/envoy/testdata/defaults.golden +++ b/command/connect/envoy/testdata/defaults.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/existing-ca-file.golden b/command/connect/envoy/testdata/existing-ca-file.golden index 761fcc56c..36c74916f 100644 --- a/command/connect/envoy/testdata/existing-ca-file.golden +++ b/command/connect/envoy/testdata/existing-ca-file.golden @@ -45,6 +45,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -84,6 +132,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/existing-ca-path.golden b/command/connect/envoy/testdata/existing-ca-path.golden index 7aa205762..6c05cc6f9 100644 --- a/command/connect/envoy/testdata/existing-ca-path.golden +++ b/command/connect/envoy/testdata/existing-ca-path.golden @@ -45,6 +45,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -84,6 +132,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/extra_-multiple.golden b/command/connect/envoy/testdata/extra_-multiple.golden index 0b432401d..839dab512 100644 --- a/command/connect/envoy/testdata/extra_-multiple.golden +++ b/command/connect/envoy/testdata/extra_-multiple.golden @@ -58,6 +58,54 @@ ], "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -97,6 +145,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/extra_-single.golden b/command/connect/envoy/testdata/extra_-single.golden index 97b0568c1..94ad8e426 100644 --- a/command/connect/envoy/testdata/extra_-single.golden +++ b/command/connect/envoy/testdata/extra_-single.golden @@ -49,6 +49,54 @@ ], "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -88,6 +136,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/grpc-addr-config.golden b/command/connect/envoy/testdata/grpc-addr-config.golden index c438f4bf7..bca728cd2 100644 --- a/command/connect/envoy/testdata/grpc-addr-config.golden +++ b/command/connect/envoy/testdata/grpc-addr-config.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/grpc-addr-env.golden b/command/connect/envoy/testdata/grpc-addr-env.golden index c438f4bf7..bca728cd2 100644 --- a/command/connect/envoy/testdata/grpc-addr-env.golden +++ b/command/connect/envoy/testdata/grpc-addr-env.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/grpc-addr-flag.golden b/command/connect/envoy/testdata/grpc-addr-flag.golden index c438f4bf7..bca728cd2 100644 --- a/command/connect/envoy/testdata/grpc-addr-flag.golden +++ b/command/connect/envoy/testdata/grpc-addr-flag.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/grpc-addr-unix.golden b/command/connect/envoy/testdata/grpc-addr-unix.golden index 11413cf4a..3dd5fa9a0 100644 --- a/command/connect/envoy/testdata/grpc-addr-unix.golden +++ b/command/connect/envoy/testdata/grpc-addr-unix.golden @@ -35,6 +35,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -74,6 +122,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/ingress-gateway-address-specified.golden b/command/connect/envoy/testdata/ingress-gateway-address-specified.golden index efb6232c3..dc3847a77 100644 --- a/command/connect/envoy/testdata/ingress-gateway-address-specified.golden +++ b/command/connect/envoy/testdata/ingress-gateway-address-specified.golden @@ -109,6 +109,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -148,6 +196,18 @@ { "tag_name": "local_cluster", "fixed_value": "ingress-gateway" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "ingress-gateway" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden b/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden index de1912ec9..4f4fc910c 100644 --- a/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden +++ b/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden @@ -109,6 +109,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -148,6 +196,18 @@ { "tag_name": "local_cluster", "fixed_value": "ingress-gateway" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "ingress-gateway" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden b/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden index 0d1239e90..7a94bed1d 100644 --- a/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden +++ b/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden @@ -109,6 +109,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -148,6 +196,18 @@ { "tag_name": "local_cluster", "fixed_value": "my-gateway-123" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "my-gateway-123" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden b/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden index 93720d2b8..136fb982c 100644 --- a/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden +++ b/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden @@ -109,6 +109,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -148,6 +196,18 @@ { "tag_name": "local_cluster", "fixed_value": "my-gateway" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "my-gateway" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/ingress-gateway.golden b/command/connect/envoy/testdata/ingress-gateway.golden index d70b2b748..112d49c72 100644 --- a/command/connect/envoy/testdata/ingress-gateway.golden +++ b/command/connect/envoy/testdata/ingress-gateway.golden @@ -109,6 +109,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -148,6 +196,18 @@ { "tag_name": "local_cluster", "fixed_value": "ingress-gateway-1" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "ingress-gateway-1" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/token-arg.golden b/command/connect/envoy/testdata/token-arg.golden index 62e3a58f6..8f0fcc213 100644 --- a/command/connect/envoy/testdata/token-arg.golden +++ b/command/connect/envoy/testdata/token-arg.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/token-env.golden b/command/connect/envoy/testdata/token-env.golden index 62e3a58f6..8f0fcc213 100644 --- a/command/connect/envoy/testdata/token-env.golden +++ b/command/connect/envoy/testdata/token-env.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/token-file-arg.golden b/command/connect/envoy/testdata/token-file-arg.golden index 62e3a58f6..8f0fcc213 100644 --- a/command/connect/envoy/testdata/token-file-arg.golden +++ b/command/connect/envoy/testdata/token-file-arg.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/token-file-env.golden b/command/connect/envoy/testdata/token-file-env.golden index 62e3a58f6..8f0fcc213 100644 --- a/command/connect/envoy/testdata/token-file-env.golden +++ b/command/connect/envoy/testdata/token-file-env.golden @@ -36,6 +36,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -75,6 +123,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/command/connect/envoy/testdata/zipkin-tracing-config.golden b/command/connect/envoy/testdata/zipkin-tracing-config.golden index 811910f02..ba6245fc3 100644 --- a/command/connect/envoy/testdata/zipkin-tracing-config.golden +++ b/command/connect/envoy/testdata/zipkin-tracing-config.golden @@ -60,6 +60,54 @@ }, "stats_config": { "stats_tags": [ + { + "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.custom_hash" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service_subset" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.service" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.namespace" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.datacenter" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.routing_type" + }, + { + "regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", + "tag_name": "consul.destination.trust_domain" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", + "tag_name": "consul.destination.target" + }, + { + "regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", + "tag_name": "consul.destination.full_target" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.(([^.]+)(?:\\.[^.]+)?\\.[^.]+\\.)", + "tag_name": "consul.upstream.service" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", + "tag_name": "consul.upstream.datacenter" + }, + { + "regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.([^.]+))?\\.[^.]+\\.)", + "tag_name": "consul.upstream.namespace" + }, { "regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", "tag_name": "consul.custom_hash" @@ -99,6 +147,18 @@ { "tag_name": "local_cluster", "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.service", + "fixed_value": "test-proxy" + }, + { + "tag_name": "consul.source.namespace", + "fixed_value": "default" + }, + { + "tag_name": "consul.source.datacenter", + "fixed_value": "dc1" } ], "use_all_default_tags": true diff --git a/test/integration/connect/envoy/Dockerfile-bats b/test/integration/connect/envoy/Dockerfile-bats index 16c4c1e45..7fab98568 100644 --- a/test/integration/connect/envoy/Dockerfile-bats +++ b/test/integration/connect/envoy/Dockerfile-bats @@ -1,6 +1,6 @@ -FROM docker.mirror.hashicorp.services/fortio/fortio AS fortio +FROM hashicorp.jfrog.io/docker/fortio/fortio AS fortio -FROM docker.mirror.hashicorp.services/bats/bats:latest +FROM hashicorp.jfrog.io/docker/bats/bats:latest RUN apk add curl RUN apk add openssl diff --git a/test/integration/connect/envoy/Dockerfile-consul-envoy b/test/integration/connect/envoy/Dockerfile-consul-envoy index b6d5b3e8e..af119df94 100644 --- a/test/integration/connect/envoy/Dockerfile-consul-envoy +++ b/test/integration/connect/envoy/Dockerfile-consul-envoy @@ -3,5 +3,5 @@ ARG ENVOY_VERSION FROM consul-dev as consul -FROM docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION} +FROM hashicorp.jfrog.io/docker/envoyproxy/envoy:v${ENVOY_VERSION} COPY --from=consul /bin/consul /bin/consul diff --git a/test/integration/connect/envoy/case-centralconf/capture.sh b/test/integration/connect/envoy/case-centralconf/capture.sh new file mode 100644 index 000000000..7f0c582f8 --- /dev/null +++ b/test/integration/connect/envoy/case-centralconf/capture.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-centralconf/verify.bats b/test/integration/connect/envoy/case-centralconf/verify.bats index e25fe5646..0f4221ab5 100644 --- a/test/integration/connect/envoy/case-centralconf/verify.bats +++ b/test/integration/connect/envoy/case-centralconf/verify.bats @@ -42,15 +42,15 @@ load helpers # Should be labelling with local_cluster. retry_default \ must_match_in_prometheus_response localhost:1234 \ - '[\{,]local_cluster="s1"[,}] ' + '[\{,]consul_source_service="s1"[,}] ' # Ensure we have http metrics for public listener retry_default \ must_match_in_prometheus_response localhost:1234 \ - '[\{,]envoy_http_conn_manager_prefix="public_listener_http"[,}]' + '[\{,]envoy_http_conn_manager_prefix="public_listener"[,}]' # Ensure we have http metrics for s2 upstream retry_default \ must_match_in_prometheus_response localhost:1234 \ - '[\{,]envoy_http_conn_manager_prefix="upstream_s2_http"[,}]' + '[\{,]consul_upstream_service="s2"[,}]' } diff --git a/test/integration/connect/envoy/case-prometheus/capture.sh b/test/integration/connect/envoy/case-prometheus/capture.sh new file mode 100644 index 000000000..7f0c582f8 --- /dev/null +++ b/test/integration/connect/envoy/case-prometheus/capture.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +snapshot_envoy_admin localhost:19000 s1 primary || true diff --git a/test/integration/connect/envoy/case-prometheus/verify.bats b/test/integration/connect/envoy/case-prometheus/verify.bats index 9c4606169..3d886b60b 100644 --- a/test/integration/connect/envoy/case-prometheus/verify.bats +++ b/test/integration/connect/envoy/case-prometheus/verify.bats @@ -40,13 +40,13 @@ load helpers must_match_in_prometheus_response localhost:1234 \ '^envoy_http_downstream_rq_active' - # Should be labelling with local_cluster. + # Should be labelling with consul_source_service. retry_default \ must_match_in_prometheus_response localhost:1234 \ - '[\{,]local_cluster="s1"[,}] ' + '[\{,]consul_source_service="s1"[,}] ' # Should be labelling with http listener prefix. retry_default \ must_match_in_prometheus_response localhost:1234 \ - '[\{,]envoy_http_conn_manager_prefix="public_listener_http"[,}]' + '[\{,]envoy_http_conn_manager_prefix="public_listener"[,}]' } diff --git a/test/integration/connect/envoy/case-stats-proxy/verify.bats b/test/integration/connect/envoy/case-stats-proxy/verify.bats index af89d47aa..285cdd6cb 100644 --- a/test/integration/connect/envoy/case-stats-proxy/verify.bats +++ b/test/integration/connect/envoy/case-stats-proxy/verify.bats @@ -48,12 +48,12 @@ load helpers # Response should include the http public listener. retry_default \ must_match_in_stats_proxy_response localhost:1239 \ - 'stats' 'http.public_listener_http' + 'stats' 'http.public_listener' # /stats/prometheus should also be reachable and labelling the local cluster. retry_default \ must_match_in_stats_proxy_response localhost:1239 \ - 'stats/prometheus' '[\{,]local_cluster="s1"[,}]' + 'stats/prometheus' '[\{,]consul_source_service="s1"[,}]' # /stats/prometheus should also be reachable and exposing metrics. retry_default \ diff --git a/test/integration/connect/envoy/helpers.bash b/test/integration/connect/envoy/helpers.bash index e9792674e..63577e0e2 100755 --- a/test/integration/connect/envoy/helpers.bash +++ b/test/integration/connect/envoy/helpers.bash @@ -229,6 +229,7 @@ function snapshot_envoy_admin { docker_wget "$DC" "http://${HOSTPORT}/config_dump" -q -O - > "${OUTDIR}/config_dump.json" docker_wget "$DC" "http://${HOSTPORT}/clusters?format=json" -q -O - > "${OUTDIR}/clusters.json" docker_wget "$DC" "http://${HOSTPORT}/stats" -q -O - > "${OUTDIR}/stats.txt" + docker_wget "$DC" "http://${HOSTPORT}/stats/prometheus" -q -O - > "${OUTDIR}/stats_prometheus.txt" } function reset_envoy_metrics { diff --git a/ui/packages/consul-ui/app/components/topology-metrics/index.hbs b/ui/packages/consul-ui/app/components/topology-metrics/index.hbs index 33701e224..74b4f9115 100644 --- a/ui/packages/consul-ui/app/components/topology-metrics/index.hbs +++ b/ui/packages/consul-ui/app/components/topology-metrics/index.hbs @@ -33,7 +33,7 @@ {{#if this.hasMetricsProvider }} {{#if (not-eq @service.Service.Kind 'ingress-gateway')}} = 2 && m[1] !== '') { + var targetService = "invalid-local-cluster"; + var m = q.match(/consul_source_service="([^"]*)"/); + if (m && m.length >= 2 && m[1] != "") { targetService = m[1]; } - m = q.match(/consul_service="([^"]*)"/); - if (type === 'downstream' && m && m.length >= 2 && m[1] !== '') { + m = q.match(/consul_destination_service="([^"]*)"/); + if (type == "downstream" && m && m.length >= 2 && m[1] != "") { // downstreams don't have the same selector for the main service // name. targetService = m[1]; } - let targets = []; + // Figure out the actual namespace for the target service + var targetNS = "invalid-local-ns"; + var m = q.match(/consul_source_namespace="([^"]*)"/); + if (m && m.length >= 2 && m[1] != "") { + targetNS = m[1]; + } + m = q.match(/consul_destination_namespace="([^"]*)"/); + if (type == "downstream" && m && m.length >= 2 && m[1] != "") { + // downstreams don't have the same selector for the main service + // name. + targetNS = m[1]; + } + + // Figure out the actual datacenter for the target service + var targetDC = "invalid-local-dc"; + var m = q.match(/consul_source_datacenter="([^"]*)"/); + if (m && m.length >= 2 && m[1] != "") { + targetDC = m[1]; + } + m = q.match(/consul_destination_datacenter="([^"]*)"/); + if (type == "downstream" && m && m.length >= 2 && m[1] != "") { + // downstreams don't have the same selector for the main service + // name. + targetDC = m[1]; + } + + var serviceNames = []; switch(type) { case 'downstream': // fallthrough case 'upstream': @@ -156,12 +182,10 @@ let metric = `{}`; switch(type) { case 'upstream': - // TODO: this should really return tcp proxy label for tcp - // metrics but we don't look at that for now. - metric = `{"upstream": "${item.Name}", "envoy_http_conn_manager_prefix": "${item.Name}"}`; + metric = `{"consul_upstream_service": "${item.Name}", "consul_upstream_datacenter": "${targetDC}", "consul_upstream_namespace": "${targetNS}"}`; break; - case 'downstream': - metric = `{"downstream": "${item.Name}", "local_cluster": "${item.Name}"}`; + case "downstream": + metric = `{"consul_source_service": "${item.Name}", "consul_source_datacenter": "${targetDC}", "consul_source_namespace": "${targetNS}"}`; break; } const timestamp = Date.now() / 1000; diff --git a/ui/packages/consul-ui/vendor/metrics-providers/prometheus.js b/ui/packages/consul-ui/vendor/metrics-providers/prometheus.js index 0d25629bf..8bd5c87fc 100644 --- a/ui/packages/consul-ui/vendor/metrics-providers/prometheus.js +++ b/ui/packages/consul-ui/vendor/metrics-providers/prometheus.js @@ -1,5 +1,5 @@ /*eslint no-console: "off"*/ -(function() { +(function () { var emptySeries = { unitSuffix: '', labels: {}, data: [] }; var prometheusProvider = { @@ -23,7 +23,7 @@ * The provider should throw an Exception if the options are not valid for * example because it requires a metrics proxy and one is not configured. */ - init: function(options) { + init: function (options) { this.options = options; if (!this.options.metrics_proxy_enabled) { throw new Error( @@ -35,18 +35,18 @@ // simple httpGet function that also encodes query parameters // before passing the constructed url through to native fetch // any errors should throw an error with a statusCode property - httpGet: function(url, queryParams, headers) { + httpGet: function (url, queryParams, headers) { if (queryParams) { var separator = url.indexOf('?') !== -1 ? '&' : '?'; var qs = Object.keys(queryParams) - .map(function(key) { + .map(function (key) { return encodeURIComponent(key) + '=' + encodeURIComponent(queryParams[key]); }) .join('&'); url = url + separator + qs; } // fetch the url along with any headers - return this.options.fetch(url, { headers: headers || {} }).then(function(response) { + return this.options.fetch(url, { headers: headers || {} }).then(function (response) { if (response.ok) { return response.json(); } else { @@ -112,7 +112,7 @@ * Every data point object should have a value for every series label * (except for "Total") otherwise it will be assumed to be "0". */ - serviceRecentSummarySeries: function(serviceDC, namespace, serviceName, protocol, options) { + serviceRecentSummarySeries: function (service, dc, nspace, protocol, options) { // Fetch time-series var series = []; var labels = []; @@ -124,11 +124,11 @@ options.end = now; if (this.hasL7Metrics(protocol)) { - return this.fetchRequestRateSeries(serviceName, options); + return this.fetchRequestRateSeries(service, dc, nspace, options); } // Fallback to just L4 metrics. - return this.fetchDataRateSeries(serviceName, options); + return this.fetchDataRateSeries(service, dc, nspace, options); }, /** @@ -165,20 +165,20 @@ * ] * } */ - serviceRecentSummaryStats: function(serviceDC, namespace, serviceName, protocol, options) { + serviceRecentSummaryStats: function (service, dc, nspace, protocol, options) { // Fetch stats var stats = []; if (this.hasL7Metrics(protocol)) { - stats.push(this.fetchRPS(serviceName, 'service', options)); - stats.push(this.fetchER(serviceName, 'service', options)); - stats.push(this.fetchPercentile(50, serviceName, 'service', options)); - stats.push(this.fetchPercentile(99, serviceName, 'service', options)); + stats.push(this.fetchRPS(service, dc, nspace, 'service', options)); + stats.push(this.fetchER(service, dc, nspace, 'service', options)); + stats.push(this.fetchPercentile(50, service, dc, nspace, 'service', options)); + stats.push(this.fetchPercentile(99, service, dc, nspace, 'service', options)); } else { // Fallback to just L4 metrics. - stats.push(this.fetchConnRate(serviceName, 'service', options)); - stats.push(this.fetchServiceRx(serviceName, 'service', options)); - stats.push(this.fetchServiceTx(serviceName, 'service', options)); - stats.push(this.fetchServiceNoRoute(serviceName, 'service', options)); + stats.push(this.fetchConnRate(service, dc, nspace, 'service', options)); + stats.push(this.fetchServiceRx(service, dc, nspace, 'service', options)); + stats.push(this.fetchServiceTx(service, dc, nspace, 'service', options)); + stats.push(this.fetchServiceNoRoute(service, dc, nspace, 'service', options)); } return this.fetchStats(stats); }, @@ -216,8 +216,8 @@ * } * } */ - upstreamRecentSummaryStats: function(serviceDC, namespace, serviceName, upstreamName, options) { - return this.fetchRecentSummaryStats(serviceName, 'upstream', options); + upstreamRecentSummaryStats: function (service, dc, nspace, options) { + return this.fetchRecentSummaryStats(service, dc, nspace, 'upstream', options); }, /** @@ -245,13 +245,13 @@ * * { * stats: { - * // Each downstream will appear as an entry keyed by the downstream - * // service name. The value is an array of stats with the same + * // Each downstream will appear as an entry keyed by "service.namespace.dc". + * // The value is an array of stats with the same * // format as serviceRecentSummaryStats response.stats. Different * // downstreams may display different stats if required although the * // protocol should be the same for all as it is the target * // service's protocol that matters here. - * "downstream_name": [ + * "web.default.dc1": [ * {label: "SR", desc: "...", value: "99%"}, * ... * ], @@ -259,37 +259,37 @@ * } * } */ - downstreamRecentSummaryStats: function(serviceDC, namespace, serviceName, options) { - return this.fetchRecentSummaryStats(serviceName, 'downstream', options); + downstreamRecentSummaryStats: function (service, dc, nspace, options) { + return this.fetchRecentSummaryStats(service, dc, nspace, 'downstream', options); }, - fetchRecentSummaryStats: function(serviceName, type, options) { + fetchRecentSummaryStats: function (service, dc, nspace, type, options) { // Fetch stats var stats = []; // We don't know which upstreams are HTTP/TCP so just fetch all of them. // HTTP - stats.push(this.fetchRPS(serviceName, type, options)); - stats.push(this.fetchER(serviceName, type, options)); - stats.push(this.fetchPercentile(50, serviceName, type, options)); - stats.push(this.fetchPercentile(99, serviceName, type, options)); + stats.push(this.fetchRPS(service, dc, nspace, type, options)); + stats.push(this.fetchER(service, dc, nspace, type, options)); + stats.push(this.fetchPercentile(50, service, dc, nspace, type, options)); + stats.push(this.fetchPercentile(99, service, dc, nspace, type, options)); // L4 - stats.push(this.fetchConnRate(serviceName, type, options)); - stats.push(this.fetchServiceRx(serviceName, type, options)); - stats.push(this.fetchServiceTx(serviceName, type, options)); - stats.push(this.fetchServiceNoRoute(serviceName, type, options)); + stats.push(this.fetchConnRate(service, dc, nspace, type, options)); + stats.push(this.fetchServiceRx(service, dc, nspace, type, options)); + stats.push(this.fetchServiceTx(service, dc, nspace, type, options)); + stats.push(this.fetchServiceNoRoute(service, dc, nspace, type, options)); return this.fetchStatsGrouped(stats); }, - hasL7Metrics: function(protocol) { + hasL7Metrics: function (protocol) { return protocol === 'http' || protocol === 'http2' || protocol === 'grpc'; }, - fetchStats: function(statsPromises) { - var all = Promise.all(statsPromises).then(function(results) { + fetchStats: function (statsPromises) { + var all = Promise.all(statsPromises).then(function (results) { var data = { stats: [], }; @@ -306,8 +306,8 @@ return all; }, - fetchStatsGrouped: function(statsPromises) { - var all = Promise.all(statsPromises).then(function(results) { + fetchStatsGrouped: function (statsPromises) { + var all = Promise.all(statsPromises).then(function (results) { var data = { stats: {}, }; @@ -330,8 +330,8 @@ return all; }, - reformatSeries: function(unitSuffix, labelMap) { - return function(response) { + reformatSeries: function (unitSuffix, labelMap) { + return function (response) { // Handle empty result sets gracefully. if ( !response.data || @@ -347,7 +347,7 @@ // Populate time values first based on first result since Prometheus will // always return all the same points for all series in the query. - let series = response.data.result[0].values.map(function(d, i) { + let series = response.data.result[0].values.map(function (d, i) { return { time: Math.round(d[0] * 1000), }; @@ -355,8 +355,8 @@ // Then for each series returned populate the labels and values in the // points. - response.data.result.map(function(d) { - d.values.map(function(p, i) { + response.data.result.map(function (d) { + d.values.map(function (p, i) { series[i][d.metric.label] = parseFloat(p[1]); }); }); @@ -369,7 +369,7 @@ }; }, - fetchRequestRateSeries: function(serviceName, options) { + fetchRequestRateSeries: function (service, dc, nspace, options) { // We need the sum of all non-500 error rates as one value and the 500 // error rate as a separate series so that they stack to show the full // request rate. Some creative label replacement makes this possible in @@ -383,7 +383,11 @@ // will get summed together. `label_replace(` + // Get rate of requests to the service - `irate(envoy_listener_http_downstream_rq_xx{local_cluster="${serviceName}",envoy_http_conn_manager_prefix="public_listener_http"}[10m])` + + `irate(envoy_listener_http_downstream_rq_xx{` + + `consul_source_service="${service}",` + + `consul_source_datacenter="${dc}",` + + `consul_source_namespace="${nspace}",` + + `envoy_http_conn_manager_prefix="public_listener"}[10m])` + // ... inner replacement matches all code classes except "5" and // applies err=no `, "label", "Successes", "envoy_response_code_class", "[^5]")` + @@ -399,7 +403,7 @@ return this.fetchSeries(q, options).then(this.reformatSeries(' rps', labelMap)); }, - fetchDataRateSeries: function(serviceName, options) { + fetchDataRateSeries: function (service, dc, nspace, options) { // 8 * converts from bytes/second to bits/second var q = `8 * sum by (label) (` + @@ -407,13 +411,21 @@ // being summed together. `label_replace(` + // Get the tx rate - `irate(envoy_tcp_downstream_cx_tx_bytes_total{local_cluster="${serviceName}",envoy_tcp_prefix="public_listener_tcp"}[10m])` + + `irate(envoy_tcp_downstream_cx_tx_bytes_total{` + + `consul_source_service="${service}",` + + `consul_source_datacenter="${dc}",` + + `consul_source_namespace="${nspace}",` + + `envoy_tcp_prefix="public_listener"}[10m])` + // Match all and apply the tx label `, "label", "Outbound", "__name__", ".*"` + // Union those vectors with the RX ones `) or label_replace(` + // Get the rx rate - `irate(envoy_tcp_downstream_cx_rx_bytes_total{local_cluster="${serviceName}",envoy_tcp_prefix="public_listener_tcp"}[10m])` + + `irate(envoy_tcp_downstream_cx_rx_bytes_total{` + + `consul_source_service="${service}",` + + `consul_source_datacenter="${dc}",` + + `consul_source_namespace="${nspace}",` + + `envoy_tcp_prefix="public_listener"}[10m])` + // Match all and apply the rx label `, "label", "Inbound", "__name__", ".*"` + `)` + @@ -426,218 +438,186 @@ return this.fetchSeries(q, options).then(this.reformatSeries('bps', labelMap)); }, - makeSubject: function(serviceName, type) { + makeSubject: function (service, dc, nspace, type) { + var entity = `${nspace}/${service} (${dc})`; if (type == 'upstream') { // {{GROUP}} is a placeholder that is replaced by the upstream name - return `${serviceName} → {{GROUP}}`; + return `${entity} → {{GROUP}}`; } if (type == 'downstream') { // {{GROUP}} is a placeholder that is replaced by the downstream name - return `{{GROUP}} → ${serviceName}`; + return `{{GROUP}} → ${entity}`; } - return serviceName; + return entity; }, - makeHTTPSelector: function(serviceName, type) { + makeHTTPSelector: function (service, dc, nspace, type) { // Downstreams are totally different if (type == 'downstream') { - return `consul_service="${serviceName}"`; + return `consul_destination_service="${service}",consul_destination_datacenter="${dc}",consul_destination_namespace="${nspace}"`; } - var lc = `local_cluster="${serviceName}"`; + var lc = `consul_source_service="${service}",consul_source_datacenter="${dc}",consul_source_namespace="${nspace}"`; if (type == 'upstream') { - lc += `,envoy_http_conn_manager_prefix=~"upstream_.*"`; + lc += `,envoy_http_conn_manager_prefix="upstream"`; } else { // Only care about inbound public listener - lc += `,envoy_http_conn_manager_prefix="public_listener_http"`; + lc += `,envoy_http_conn_manager_prefix="public_listener"`; } return lc; }, - makeTCPSelector: function(serviceName, type) { + makeTCPSelector: function (service, dc, nspace, type) { // Downstreams are totally different if (type == 'downstream') { - return `consul_service="${serviceName}"`; + return `consul_destination_service="${service}",consul_destination_datacenter="${dc}",consul_destination_namespace="${nspace}"`; } - var lc = `local_cluster="${serviceName}"`; + var lc = `consul_source_service="${service}",consul_source_datacenter="${dc}",consul_source_namespace="${nspace}"`; if (type == 'upstream') { - lc += `,envoy_tcp_prefix=~"upstream_.*"`; + lc += `,envoy_tcp_prefix=~"upstream.*"`; } else { // Only care about inbound public listener - lc += `,envoy_tcp_prefix="public_listener_tcp"`; + lc += `,envoy_tcp_prefix="public_listener"`; } return lc; }, - groupQueryHTTP: function(type, q) { + groupQuery: function (type, q) { if (type == 'upstream') { - q += ' by (envoy_http_conn_manager_prefix)'; - // Extract the raw upstream service name to group results by - q = this.upstreamRelabelQueryHTTP(q); + q += ' by (consul_upstream_service,consul_upstream_datacenter,consul_upstream_namespace)'; } else if (type == 'downstream') { - q += ' by (local_cluster)'; - q = this.downstreamRelabelQuery(q); + q += ' by (consul_source_service,consul_source_datacenter,consul_source_namespace)'; } return q; }, - groupQueryTCP: function(type, q) { + groupByInfix: function (type) { if (type == 'upstream') { - q += ' by (envoy_tcp_prefix)'; - // Extract the raw upstream service name to group results by - q = this.upstreamRelabelQueryTCP(q); + return 'upstream'; } else if (type == 'downstream') { - q += ' by (local_cluster)'; - q = this.downstreamRelabelQuery(q); - } - return q; - }, - - upstreamRelabelQueryHTTP: function(q) { - return `label_replace(${q}, "upstream", "$1", "envoy_http_conn_manager_prefix", "upstream_(.*)_http")`; - }, - - upstreamRelabelQueryTCP: function(q) { - return `label_replace(${q}, "upstream", "$1", "envoy_tcp_prefix", "upstream_(.*)_tcp")`; - }, - - downstreamRelabelQuery: function(q) { - return `label_replace(${q}, "downstream", "$1", "local_cluster", "(.*)")`; - }, - - groupBy: function(type) { - if (type == 'service') { + return 'source'; + } else { return false; } - return type; }, - metricPrefixHTTP: function(type) { + metricPrefixHTTP: function (type) { if (type == 'downstream') { return 'envoy_cluster_upstream_rq'; } return 'envoy_http_downstream_rq'; }, - metricPrefixTCP: function(type) { + metricPrefixTCP: function (type) { if (type == 'downstream') { return 'envoy_cluster_upstream_cx'; } return 'envoy_tcp_downstream_cx'; }, - fetchRPS: function(serviceName, type, options) { - var sel = this.makeHTTPSelector(serviceName, type); - var subject = this.makeSubject(serviceName, type); + fetchRPS: function (service, dc, nspace, type, options) { + var sel = this.makeHTTPSelector(service, dc, nspace, type); + var subject = this.makeSubject(service, dc, nspace, type); var metricPfx = this.metricPrefixHTTP(type); var q = `sum(rate(${metricPfx}_completed{${sel}}[15m]))`; return this.fetchStat( - this.groupQueryHTTP(type, q), + this.groupQuery(type, q), 'RPS', `${subject} request rate averaged over the last 15 minutes`, shortNumStr, - this.groupBy(type) + this.groupByInfix(type) ); }, - fetchER: function(serviceName, type, options) { - var sel = this.makeHTTPSelector(serviceName, type); - var subject = this.makeSubject(serviceName, type); + fetchER: function (service, dc, nspace, type, options) { + var sel = this.makeHTTPSelector(service, dc, nspace, type); + var subject = this.makeSubject(service, dc, nspace, type); var groupBy = ''; if (type == 'upstream') { - groupBy += ' by (envoy_http_conn_manager_prefix)'; + groupBy += + ' by (consul_upstream_service,consul_upstream_datacenter,consul_upstream_namespace)'; } else if (type == 'downstream') { - groupBy += ' by (local_cluster)'; + groupBy += ' by (consul_source_service,consul_source_datacenter,consul_source_namespace)'; } var metricPfx = this.metricPrefixHTTP(type); var q = `sum(rate(${metricPfx}_xx{${sel},envoy_response_code_class="5"}[15m]))${groupBy}/sum(rate(${metricPfx}_xx{${sel}}[15m]))${groupBy}`; - if (type == 'upstream') { - q = this.upstreamRelabelQueryHTTP(q); - } else if (type == 'downstream') { - q = this.downstreamRelabelQuery(q); - } return this.fetchStat( q, 'ER', `Percentage of ${subject} requests which were 5xx status over the last 15 minutes`, - function(val) { + function (val) { return shortNumStr(val) + '%'; }, - this.groupBy(type) + this.groupByInfix(type) ); }, - fetchPercentile: function(percentile, serviceName, type, options) { - var sel = this.makeHTTPSelector(serviceName, type); - var subject = this.makeSubject(serviceName, type); + fetchPercentile: function (percentile, service, dc, nspace, type, options) { + var sel = this.makeHTTPSelector(service, dc, nspace, type); + var subject = this.makeSubject(service, dc, nspace, type); var groupBy = 'le'; if (type == 'upstream') { - groupBy += ',envoy_http_conn_manager_prefix'; + groupBy += ',consul_upstream_service,consul_upstream_datacenter,consul_upstream_namespace'; } else if (type == 'downstream') { - groupBy += ',local_cluster'; + groupBy += ',consul_source_service,consul_source_datacenter,consul_source_namespace'; } var metricPfx = this.metricPrefixHTTP(type); var q = `histogram_quantile(${percentile / 100}, sum by(${groupBy}) (rate(${metricPfx}_time_bucket{${sel}}[15m])))`; - if (type == 'upstream') { - q = this.upstreamRelabelQueryHTTP(q); - } else if (type == 'downstream') { - q = this.downstreamRelabelQuery(q); - } return this.fetchStat( q, `P${percentile}`, `${subject} ${percentile}th percentile request service time over the last 15 minutes`, shortTimeStr, - this.groupBy(type) + this.groupByInfix(type) ); }, - fetchConnRate: function(serviceName, type, options) { - var sel = this.makeTCPSelector(serviceName, type); - var subject = this.makeSubject(serviceName, type); + fetchConnRate: function (service, dc, nspace, type, options) { + var sel = this.makeTCPSelector(service, dc, nspace, type); + var subject = this.makeSubject(service, dc, nspace, type); var metricPfx = this.metricPrefixTCP(type); var q = `sum(rate(${metricPfx}_total{${sel}}[15m]))`; return this.fetchStat( - this.groupQueryTCP(type, q), + this.groupQuery(type, q), 'CR', `${subject} inbound TCP connections per second averaged over the last 15 minutes`, shortNumStr, - this.groupBy(type) + this.groupByInfix(type) ); }, - fetchServiceRx: function(serviceName, type, options) { - var sel = this.makeTCPSelector(serviceName, type); - var subject = this.makeSubject(serviceName, type); + fetchServiceRx: function (service, dc, nspace, type, options) { + var sel = this.makeTCPSelector(service, dc, nspace, type); + var subject = this.makeSubject(service, dc, nspace, type); var metricPfx = this.metricPrefixTCP(type); var q = `8 * sum(rate(${metricPfx}_rx_bytes_total{${sel}}[15m]))`; return this.fetchStat( - this.groupQueryTCP(type, q), + this.groupQuery(type, q), 'RX', `${subject} received bits per second averaged over the last 15 minutes`, shortNumStr, - this.groupBy(type) + this.groupByInfix(type) ); }, - fetchServiceTx: function(serviceName, type, options) { - var sel = this.makeTCPSelector(serviceName, type); - var subject = this.makeSubject(serviceName, type); + fetchServiceTx: function (service, dc, nspace, type, options) { + var sel = this.makeTCPSelector(service, dc, nspace, type); + var subject = this.makeSubject(service, dc, nspace, type); var metricPfx = this.metricPrefixTCP(type); var q = `8 * sum(rate(${metricPfx}_tx_bytes_total{${sel}}[15m]))`; var self = this; return this.fetchStat( - this.groupQueryTCP(type, q), + this.groupQuery(type, q), 'TX', `${subject} transmitted bits per second averaged over the last 15 minutes`, shortNumStr, - this.groupBy(type) + this.groupByInfix(type) ); }, - fetchServiceNoRoute: function(serviceName, type, options) { - var sel = this.makeTCPSelector(serviceName, type); - var subject = this.makeSubject(serviceName, type); + fetchServiceNoRoute: function (service, dc, nspace, type, options) { + var sel = this.makeTCPSelector(service, dc, nspace, type); + var subject = this.makeSubject(service, dc, nspace, type); var metricPfx = this.metricPrefixTCP(type); var metric = '_no_route'; if (type == 'downstream') { @@ -645,16 +625,16 @@ } var q = `sum(rate(${metricPfx}${metric}{${sel}}[15m]))`; return this.fetchStat( - this.groupQueryTCP(type, q), + this.groupQuery(type, q), 'NR', `${subject} unroutable (failed) connections per second averaged over the last 15 minutes`, shortNumStr, - this.groupBy(type) + this.groupByInfix(type) ); }, - fetchStat: function(promql, label, desc, formatter, groupBy) { - if (!groupBy) { + fetchStat: function (promql, label, desc, formatter, groupByInfix) { + if (!groupByInfix) { // If we don't have a grouped result and its just a single stat, return // no result as a zero not a missing stat. promql += ' OR on() vector(0)'; @@ -663,8 +643,8 @@ query: promql, time: new Date().getTime() / 1000, }; - return this.httpGet('/api/v1/query', params).then(function(response) { - if (!groupBy) { + return this.httpGet('/api/v1/query', params).then(function (response) { + if (!groupByInfix) { // Not grouped, expect just one stat value return that var v = parseFloat(response.data.result[0].value[1]); return { @@ -678,7 +658,10 @@ for (var i = 0; i < response.data.result.length; i++) { var res = response.data.result[i]; var v = parseFloat(res.value[1]); - var groupName = res.metric[groupBy]; + var service = res.metric['consul_' + groupByInfix + '_service']; + var nspace = res.metric['consul_' + groupByInfix + '_namespace']; + var datacenter = res.metric['consul_' + groupByInfix + '_datacenter']; + var groupName = `${service}.${nspace}.${datacenter}`; data[groupName] = { label: label, desc: desc.replace('{{GROUP}}', groupName), @@ -689,7 +672,7 @@ }); }, - fetchSeries: function(promql, options) { + fetchSeries: function (promql, options) { var params = { query: promql, start: options.start,