Skip to content

Commit

Permalink
Resolves mismatched cluster names on envoy_stats
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis <[email protected]>
  • Loading branch information
alexeikmun authored and LanceEa committed Sep 23, 2022
1 parent 2ae0f00 commit e139053
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/ambassador/diagnostics/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ def __init__(self, diag: "Diagnostics", estat: EnvoyStats, request) -> None:

# Go ahead and grab Envoy cluster stats for all possible clusters.
# XXX This might be a bit silly.
self.cluster_names = [cluster.envoy_name for cluster in self.diag.clusters.values()]
self.cstats = {name: self.estat.cluster_stats(name) for name in self.cluster_names}
self.cstats = {
cluster.envoy_name: self.estat.cluster_stats(cluster.stats_name)
for cluster in self.diag.clusters.values()
}

# Save the request host and scheme. We'll need them later.
self.request_host = request.headers.get("Host", "*")
Expand Down

0 comments on commit e139053

Please sign in to comment.