diff --git a/agent/xdsv2/testdata/listeners/destination/mixed-multi-destination.golden b/agent/xdsv2/testdata/listeners/destination/mixed-multi-destination.golden index 23dd5e4c6475..eae168bf8aa0 100644 --- a/agent/xdsv2/testdata/listeners/destination/mixed-multi-destination.golden +++ b/agent/xdsv2/testdata/listeners/destination/mixed-multi-destination.golden @@ -17,7 +17,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "upstream.", + "statPrefix": "upstream.http.api-1.default.default.dc1", "rds": { "configSource": { "ads": {}, diff --git a/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden b/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden index 9cd146e6ef0d..b0477d8310e1 100644 --- a/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden +++ b/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden @@ -47,7 +47,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "upstream.", + "statPrefix": "upstream.http.api-app.default.default.dc1", "rds": { "configSource": { "ads": {}, @@ -140,7 +140,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "upstream.", + "statPrefix": "upstream.http.api-app2.default.default.dc1", "rds": { "configSource": { "ads": {}, diff --git a/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden b/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden index 71dec1b4db46..180213b6523c 100644 --- a/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden +++ b/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden @@ -47,7 +47,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "upstream.", + "statPrefix": "upstream.http.api-app.default.default.dc1", "rds": { "configSource": { "ads": {}, diff --git a/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden b/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden index 71dec1b4db46..180213b6523c 100644 --- a/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden +++ b/agent/xdsv2/testdata/listeners/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden @@ -47,7 +47,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "upstream.", + "statPrefix": "upstream.http.api-app.default.default.dc1", "rds": { "configSource": { "ads": {}, diff --git a/internal/mesh/internal/controllers/sidecarproxy/builder/destinations.go b/internal/mesh/internal/controllers/sidecarproxy/builder/destinations.go index f2c4901c89b6..c078c3273e43 100644 --- a/internal/mesh/internal/controllers/sidecarproxy/builder/destinations.go +++ b/internal/mesh/internal/controllers/sidecarproxy/builder/destinations.go @@ -248,7 +248,7 @@ func (b *Builder) buildDestination( panic(fmt.Sprintf("it should not be possible to have a tcp protocol here: %v", effectiveProtocol)) } - rb := lb.addL7Router(routeName, "", effectiveProtocol) + rb := lb.addL7Router(routeName, statPrefix, effectiveProtocol) if destination.Explicit == nil { rb.addIPAndPortMatch(destination.VirtualIPs, virtualPortNumber) } @@ -372,7 +372,7 @@ func (b *ListenerBuilder) addL4RouterForDirect(clusterName, statPrefix string) * router := &pbproxystate.Router{} if statPrefix == "" { - statPrefix = "upstream." + statPrefix = fmt.Sprintf("upstream.%s", clusterName) } router.Destination = &pbproxystate.Router_L4{ diff --git a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/mixed-multi-destination.golden b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/mixed-multi-destination.golden index ca69db7dfcb0..cbd28e7a70a4 100644 --- a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/mixed-multi-destination.golden +++ b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/mixed-multi-destination.golden @@ -234,7 +234,7 @@ "route": { "name": "default/local/default/api-1:http:1.1.1.1:1234" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-1.default.default.dc1" } } ] diff --git a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden index f77f427d1995..94e8e1c21577 100644 --- a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden +++ b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden @@ -257,7 +257,7 @@ "route": { "name": "default/local/default/api-app:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app.default.default.dc1" }, "match": { "destinationPort": 8080, @@ -274,7 +274,7 @@ "route": { "name": "default/local/default/api-app2:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app2.default.default.dc1" }, "match": { "destinationPort": 8080, diff --git a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden index e6f75c9078fa..479a4e7aefd2 100644 --- a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden +++ b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden @@ -152,7 +152,7 @@ "route": { "name": "default/local/default/api-app:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app.default.default.dc1" }, "match": { "destinationPort": 8080, diff --git a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden index e6f75c9078fa..479a4e7aefd2 100644 --- a/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden +++ b/internal/mesh/internal/controllers/sidecarproxy/builder/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden @@ -152,7 +152,7 @@ "route": { "name": "default/local/default/api-app:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app.default.default.dc1" }, "match": { "destinationPort": 8080, diff --git a/internal/mesh/internal/controllers/xds/testdata/destination/mixed-multi-destination.golden b/internal/mesh/internal/controllers/xds/testdata/destination/mixed-multi-destination.golden index 2638cf3f806e..3acd9869e51d 100644 --- a/internal/mesh/internal/controllers/xds/testdata/destination/mixed-multi-destination.golden +++ b/internal/mesh/internal/controllers/xds/testdata/destination/mixed-multi-destination.golden @@ -285,7 +285,7 @@ "route": { "name": "default/local/default/api-1:http:1.1.1.1:1234" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-1.default.default.dc1" } } ] diff --git a/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden b/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden index 0d418fc68059..0158f07aa2c5 100644 --- a/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden +++ b/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-multiple-implicit-destinations-tproxy.golden @@ -330,7 +330,7 @@ "route": { "name": "default/local/default/api-app:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app.default.default.dc1" }, "match": { "destinationPort": 8080, @@ -347,7 +347,7 @@ "route": { "name": "default/local/default/api-app2:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app2.default.default.dc1" }, "match": { "destinationPort": 8080, diff --git a/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden b/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden index c465d0ad84b7..3c9d62fb4ea1 100644 --- a/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden +++ b/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-tproxy.golden @@ -192,7 +192,7 @@ "route": { "name": "default/local/default/api-app:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app.default.default.dc1" }, "match": { "destinationPort": 8080, diff --git a/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden b/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden index c465d0ad84b7..3c9d62fb4ea1 100644 --- a/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden +++ b/internal/mesh/internal/controllers/xds/testdata/destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy.golden @@ -192,7 +192,7 @@ "route": { "name": "default/local/default/api-app:http" }, - "statPrefix": "upstream." + "statPrefix": "upstream.http.api-app.default.default.dc1" }, "match": { "destinationPort": 8080,