-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 #1602
Comments
/sig instrumentation |
/help |
@serathius: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
interested in |
/cc |
/milestone v1.19 |
@serathius: You must be a member of the kubernetes/milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your and have them propose you as an additional delegate for this responsibility. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/milestone v1.19 |
/cc |
KEP was marked as "implementable", so we can start working on it. If your interested in contributing please volunteer directly on subtasks or ask for specific task here. |
/cc |
After discussing offline with @dims we concluded that upgrading klog will be non-trivial as we need to upgrade all references at once. Upgrade cannot be done partially as it would break klog configuration. We considered two options:
As we have a lot of time before 1.19 cut we would like to do it properly. I will create subtask with upgrade plan. |
/cc |
@serathius Enhancements shadow for v1.19 here. Do you see this as moving to alpha in 1.19? |
Yes, I think we are on track. We are finishing klog upgrade, after that next milestones will be really fast to implement. |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@pohly is this dependent on contextual logging? |
Yes. We are now doing both together. |
Are there any plans to migrate logs inside client-go to structured logs? https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/tools/cache/reflector.go#L295 |
Yes, most likely. Now that interaction with slog in Go 1.21 is clear(er), we can continue like we did so far based on klog+go-logr. I'm hoping to get confirmation from others for that plan in #4181. |
@pohly @mengjiao-liu Based on #1602 (comment), I assume this will not progress to GA in 1.30? |
/unassign @serathius @dashpole: yes, let's keep it in beta. We keep chucking away at the code, but the conversion is not complete yet. At some point we also need to find our whether JSON output really is being used. I'll need help from the SIG for this. |
this-week: 2024-03-29
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Enhancement Description
Define standard structure for Kubernetes log messages, add methods to klog to enforce this structure, add ability to configure Kubernetes components to produce logs in JSON format and initiate migration to structured logging.
Alpha
Implement
text
format by addingklog.InfoS
,klog.ErrorS
functions to k8s.io/klog (Implement InfoS and ErrorS functions klog#125, @yuzhiquan)Implement
klog.KObj
,klog.KRef
to k8s.io/klog (Implement klog.KObj klog.KRef functions klog#127, @tahsinrahman)Upgrade klog to v2 (Upgrade to klogv2 kubernetes#89961. @dims)
Implement
--logging-format
flag in k8s.io/component-base (Implement--logging-format
flag in k8s.io/component-base kubernetes#89190, @yuzhiquan)Prepare migration instructions (@serathius, Add instructions for structured logging migration community#4793)
Migrate selected log messages to
klog.InfoS
using Migration InstructionsImplement
json
log format (@yuzhiquan, Implement json log format kubernetes#91490)Update flag help to list both format options (@serathius, Update logging format flag help kubernetes#92177)
Add
--logging-format
flag to kubernetes components--logging-format
flag for kube-apiserver kubernetes#91501, @tahsinrahman)Write documentation for new logging format (Document Structured Logging Enhancement website#21202, @serathius)
Follow-up from main tasks:
InfoS
serializing Stringer subfields klog#156 (@yuzhiquan)%#s
for errors instead of%q
klog#158 (@tahsinrahman)Beta
Follow ups:
Please let me know if someone is interested in working on one of the tasks.
The text was updated successfully, but these errors were encountered: