Skip to content

Remove ScopeStatsLimitSettings: no longer needed since stats dropped …#44208

Closed
RepoRonin wants to merge 1 commit intoenvoyproxy:mainfrom
RepoRonin:remove-scope-stats-limit-settings
Closed

Remove ScopeStatsLimitSettings: no longer needed since stats dropped …#44208
RepoRonin wants to merge 1 commit intoenvoyproxy:mainfrom
RepoRonin:remove-scope-stats-limit-settings

Conversation

@RepoRonin
Copy link
Copy Markdown

@RepoRonin RepoRonin commented Apr 1, 2026

Fixes #44162

stats: remove ScopeStatsLimitSettings and per-scope stat overflow counters

Additional Description : ScopeStatsLimitSettings was previously used to limit the number of
counters, gauges, and histograms in a shared memory block per scope.
Since stats no longer use shared memory, these limits have no effect
and there is no way to set them. The command-line options were
deprecated in #5910 (2019) and removed shortly after.

This removes the dead code entirely.

Note: This PR was developed with the assistance of generative AI
The changes have been reviewed and understood by the author.

Risk Level: Low

Testing: No new tests needed. Existing tests continue to pass — the removed parameters had default values of {} (no limit) everywhere, so no behavior changes.

Docs Changes: None

Release Notes: None

Platform Specific Features: None

Deprecated: Removes ScopeStatsLimitSettings struct and the limits parameter from Scope::createScope and Scope::scopeFromStatName.

…shared memory

ScopeStatsLimitSettings was used to cap per-scope stat counts so they
would fit in a shared memory block. Stats no longer use shared memory,
so these limits serve no purpose. The command-line flags that set them
were deprecated in envoyproxy#5910 (2019) and later removed.

Remove the struct, the limits_ member from ScopeImpl, the three
overflow counters (counters_overflow_, gauges_overflow_,
histograms_overflow_) from ThreadLocalStoreImpl, the
ensureOverflowStats() helper, and all the limit-check branches in
safeMakeStat and histogramFromStatNameWithTags. Update all
createScope/scopeFromStatName signatures across production code,
mocks, and integration test helpers accordingly.
@repokitteh-read-only
Copy link
Copy Markdown

Hi @RepoRonin, 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: #44208 was opened by RepoRonin.

see: more, trace.

@jmarantz
Copy link
Copy Markdown
Contributor

jmarantz commented Apr 1, 2026

This duplicates #44211 -- can we close #44208 in favor of that? I specifically targeted #44162 for the author of #44211

@RepoRonin
Copy link
Copy Markdown
Author

This duplicates #44211 -- can we close #44208 in favor of that? I specifically targeted #44162 for the author of #44211

Correct statement #44211 duplicates #44208
And since that user is your personal bias,
I'll be closing this.

@RepoRonin RepoRonin closed this Apr 1, 2026
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.

stats: remove ScopeStatsLimitSettings in envoy/stats/scope.h and everything depending on it

2 participants