Skip to content

Comments

🐛 Limit depthWithPriorityMetric cardinality to 25#3419

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
alvaroaleman:limit-cardinality
Jan 19, 2026
Merged

🐛 Limit depthWithPriorityMetric cardinality to 25#3419
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
alvaroaleman:limit-cardinality

Conversation

@alvaroaleman
Copy link
Member

If a very large number of priorities is used, the cardinality of the priorityQueues depthWithPriority metric can grow up to the size of int, which is unreasonable high.

As the functionality is useful and the above is an outlier use-case, make the metric "smart" by collecting the priorities up to a cardinality of 25 unique values and then start using a placeholder that is hopefully self-explanatory.

Fixes #3396

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 17, 2026
@alvaroaleman
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 17, 2026
@alvaroaleman alvaroaleman force-pushed the limit-cardinality branch 2 times, most recently from daf662e to 9c026a8 Compare January 17, 2026 22:28
@sbueringer
Copy link
Member

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 19, 2026
@sbueringer
Copy link
Member

/hold

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 19, 2026
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 66a605ebcca268398410b3376ff4db4f154f13f4

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 19, 2026
If a very large number of priorities is used, the cardinality of the
priorityQueues `depthWithPriority` metric can grow up to the size of
int, which is unreasonable high.

As the functionality is useful and the above is an outlier use-case,
make the metric "smart" by collecting the priorities up to a cardinality
of 25 unique values and then start using a placeholder that is hopefully
self-explanatory.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 19, 2026
@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 19, 2026
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 1ec58c59ce5ddfaf53ee56f71a27aa3f0bb534ea

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [alvaroaleman,sbueringer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alvaroaleman
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 19, 2026
@k8s-ci-robot k8s-ci-robot merged commit 129853d into kubernetes-sigs:main Jan 19, 2026
9 checks passed
@sbueringer sbueringer mentioned this pull request Jan 19, 2026
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

priority queue metrics cause unbounded memory growth and scrape timeouts

3 participants