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
feat: Add the http return code to metric api_processed_total #31227
Conversation
Couple of things I need feedback on:
|
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.
One request, can you document the change in the Changed Metrics
in Documentation/operations/upgrade.rst
?
In case of upgrade of cilium image, the old metrics will not have return_code. So during the transition phase, we will be return_code as empty for old cilium agents. Should we return a default code (unknown) in case of that ?
I'm not sure I understand. You mean to backport the default code to older Cilium versions? I think it's fine if the new agents just start exposing this new label.
41bc3ca
to
25d6cec
Compare
6c52d48
to
0bcd25d
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.
Seems reasonable.
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.
docs good, thanks!
/test |
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.
Looks reasonable for kvstore.
I think that it was actually a wrong decision for us to reuse api_limiter
for kvstore package, but it was the closest thing that we had to implement logic we needed at that time 😿
Signed-off-by: Vipul Singh <vipul21sept@gmail.com>
/test |
@julianwiedmann I want to backport this to cilium version 1.13 and above. |
As @joestringer noted in the slack thread:
|
@tamilmani1989 pointed out that this could be useful for debugging, so in line with the "Debug tool improvements" reason in backporting I think it's reasonable to at least backport to the current stable release. |
Adding the return code to the
cilium_api_limiter_processed_requests_total
based on the error/success of the API call. It helps in filtering the metric based on http code aslabeloutcome
offail
is generic.Tested the changes via grafana and prometheus: