-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Document Structured Logging Enhancement #21202
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
Conversation
|
Deploy preview for kubernetes-io-vnext-staging processing. Building with commit f9833ee https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/5f0ce2b316c4c9000893182f |
|
/milestone 1.19 |
|
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
@serathius because of the switch to Docsy I recommend that you rebase this against dev-1.19 once you've got something ready to review. |
|
/assign |
celestehorgan
left a comment
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.
This is a good first pass! Lots of comments, mostly around grammar. Thank you for writing this!
|
|
||
| By controlling verbosity (using `-v` command line flag) we can filter logs based on how severe they are, controlling resulting log volume. | ||
| The higher verbosity of log the less severe they are, with verbosity 0 being used for logs that should ALWAYS be visible. | ||
| The practical default level is 2. |
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.
- What is the full range of numbers you can use with
-v? (it starts at 0, 2 is "practical" for daily use... but how high can I go?) - How do I use
-v– i.e.-v=0? - Is there any way we can describe what gets added to the logs with each number increment? i.e.
- 0 = essential messages, like system errors
- 1 =
- 2 = lists successful events (or something)
- 3 =
- 4 =
etc.?
if this is impractical feel free to ignore it.
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.
Ad 1, don't think there is a limit, guidelines give usecase up to 5, highest that make sense was 10 (there is 12, but looks like mistake).
Ad 2 Yes,
Ad 3 We have guide for developers (linked in what's next). But I would not suggest to detail levels in documentation as I don't think they strictly complied to, so we shouldn't promise it to users.
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.
It would help a lot to specify that logging verbosity is an integer, and to provide a range.
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.
@serathius: I would take the list from the doc you just linked and include it in this documentation :). This is valuable information!
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.
This doc is old developers guide, some parts are outdated. As this is guidelines, I don't expect them to be very accurate. I would be worried about adding this to documentation.
Verbosity level values are a evolving and can we cannot give any guarantees about where what type of log is where (in current state). Creating a guide was meant to give contributors some intuition about levels, but not hard rules.
For example, this guide lists HTTP logs on V(2), but I'm pretty sure that they are on V(3) currently. Copy&Pasting this guide will result in bad experience of users, when they will try to base their configuration on incorrect information in guide.
Overall I think we should convey that users should experiment with levels and select one based on costs they are willing to pay for log volume generated.
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.
Okay then. For now let's go with that approach :)
| By controlling verbosity (using `-v` command line flag) we can filter logs based on how severe they are, controlling resulting log volume. | ||
| The higher verbosity of log the less severe they are, with verbosity 0 being used for logs that should ALWAYS be visible. | ||
| The practical default level is 2. |
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.
| By controlling verbosity (using `-v` command line flag) we can filter logs based on how severe they are, controlling resulting log volume. | |
| The higher verbosity of log the less severe they are, with verbosity 0 being used for logs that should ALWAYS be visible. | |
| The practical default level is 2. | |
| The `-v` flag controls log verbosity. Setting the value higher increases the events logged, and decreasing it lowers the events logged. | |
| The higher verbosity of log the less severe they are, with 0 for events which should always be logged. | |
| In most cases, it's safe to use the default value, 2. |
Question: is 2 the default value?
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.
Default is 0, I copied practical default from https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md
|
Done |
|
ping @kbhawkey |
|
@serathius , I added a few more comments about tidying up the text. |
|
/lgtm |
|
Hi @serathius 👋 , Friendly reminder that docs should be reviewed and ready to be merged by |
* Separate system logs from Logging Architecture as it mainly covers application logging * Rename "Metics For The Kubernetes Control Plane" to "Metrics For The Kubernetes System Components" as it covers non-control plane components * Rename files to `system-logs.md` and `system-metrics.md` * Remove trailing whitespaces * Add sections about Klog and Structured Logging Co-authored-by: Celeste Horgan <[email protected]> Co-authored-by: Zach Corleissen <[email protected]> Co-authored-by: Tim Bannister <[email protected]> Co-authored-by: Paweł Kępka <[email protected]>
|
/lgtm |
|
/lgtm |
savitharaghunathan
left a comment
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.
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: savitharaghunathan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Placeholder for kubernetes/enhancements#1602