-
Notifications
You must be signed in to change notification settings - Fork 472
metrics: migrate Prometheus metrics to pkg/metrics helpers #4222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
metrics: migrate Prometheus metrics to pkg/metrics helpers #4222
Conversation
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
c61d544 to
ffae65b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment from my side: can you please add some context about the changes in the commit message? It would be good to get an idea of what this change does and why it is needed without having to see the GH issue.
ffae65b to
6fadafc
Compare
|
Hey, could you wrap your commit description (use Also could the commit description contains more of the "why" of the change instead of the what (that should come from the title already), see more https://tetragon.io/docs/contribution-guide/submitting-a-pull-request/#write-a-commit-message. Thank you :) |
6fadafc to
d8a3f92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LGTM, but this is really tricky to review because to check for correctness, you need to check, for example, that the Inc() method uses the same type as the one we use to generate the constrained labels. I wonder if there is a way to avoid this duplication, but it's not obvious to me how.
d8a3f92 to
a2a8c9b
Compare
The pkg/metrics helpers provide critical functionality that raw prometheus.New*Vec functions lack: automatic metric cleanup for deleted pods, cardinality constraints, configurable high-cardinality labels, and automatic documentation generation. Migrating to these helpers ensures consistent metric management across the codebase and prevents unbounded cardinality growth. Fixes cilium#2798 Signed-off-by: Aritra Dey <[email protected]>
a2a8c9b to
2e3d8e3
Compare
Fixes #2798
Description
This PR migrates Prometheus metrics to use pkg/metrics helpers.
Changelog