Skip to content

upstream: drop stats from original upstream clusters missing zone#45215

Open
mpoegel wants to merge 2 commits into
envoyproxy:mainfrom
mpoegel:empty-zone
Open

upstream: drop stats from original upstream clusters missing zone#45215
mpoegel wants to merge 2 commits into
envoyproxy:mainfrom
mpoegel:empty-zone

Conversation

@mpoegel
Copy link
Copy Markdown

@mpoegel mpoegel commented May 21, 2026

Commit Message: drop stats from original upstream clusters missing zone
Additional Description: Original destination and dynamic forward proxy clusters create hosts with empty locality zones, producing stats with double dots (e.g., cluster.foo.zone.bar..upstream_rq_200). StatNameDynamicStorage("") produces a non-empty StatName that bypasses the empty zone guard in codes.cc, unlike StatNameStorage("") which correctly produces an empty one.
This PR fixes localityZoneStatName() to return a truly empty StatName when the locality zone is empty. This then matches what I believe is the intended logic in codes.cc to skip stats that are missing either zone.
Risk Level: Low
Testing: Added a new unit test
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

mpoegel added 2 commits May 21, 2026 16:14
Signed-off-by: Matt Poegel <mpoegel@bloomberg.net>
Signed-off-by: Matt Poegel <mpoegel@bloomberg.net>
@repokitteh-read-only
Copy link
Copy Markdown

Hi @mpoegel, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #45215 was opened by mpoegel.

see: more, trace.

@mpoegel mpoegel requested a deployment to external-contributors May 21, 2026 16:52 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant