Skip to content

Commit

Permalink
NET-6319 - L7 routes have statePrefix of upstream. and should have a …
Browse files Browse the repository at this point in the history
…full path (#19473)
  • Loading branch information
jmurret authored Nov 3, 2023
1 parent 2bc0bc3 commit d94d316
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down Expand Up @@ -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": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d94d316

Please sign in to comment.