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
structured logging: switch from KObjs to KObjSlice #110737
Comments
When preparing a PR which removes KObj, remember to include a meaningful "why this is needed" in the PR description itself, for example the one above. A link to this issue should be added for cross-reference, but that alone is not enough for reviewers because it makes them do extra work (look up an issue and read through all of it). |
/assign Can I take this one up ? |
Yes, please do. |
/assign |
I can work on this |
Certainly. @yangjunmyfm192085 I just finished the first one and half way through the second. The other two I have not yet taken a look into. Mind taking one of those two ? |
Let me update the third one. thanks a lot |
/triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
What would you like to be added?
kubernetes/klog#322 added klog.KObjSlice as replacement for klog.KObjs. A version of klog with that is now in Kubernetes master.
We should:
if klogV := klog.V(5); klogV.Enabled() { klogV.Info(..., klog.KObjs(...) }
pattern was used, consider whether a directklog.V(5).Info(..., klog.KObjSlice(...))
call can be used instead. This is okay if there are no other parameters that are expensive to compute./sig instrumentation
/wg structured-logging
Why is this needed?
klog.KObjSlice takes constant time when called to prepare the parameter, in contrast to klog.KObjs which is linear with the number of entries it needs to handle.
The text was updated successfully, but these errors were encountered: