-
Notifications
You must be signed in to change notification settings - Fork 218
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: handle unusual keys? #275
Comments
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 |
/help |
@pohly: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. 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. |
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 |
/assign |
Not sure where this use comment is now, but it seems relevant, so let me quote and reply:
So it panics instead of continuing with the tests? Skipping such tests is one way of avoiding this, but ultimately we want to test also such behavior. Perhaps the logger invocation can be wrapped with a |
@pohly I was adding that comment from my phone. Seems like I deleted it by mistake. Thanks for getting back to me.
No it does not. It causes a log entry with I started adding a few tests and there are considerable difference in how the |
/kind feature
Describe the solution you'd like
The current design decision is to dump keys as strings without any checks. If those keys contain spaces, line breaks, or other weird characters, then the log output will get messed up.
Presumably this was done for the sake of performance. We should measure the impact of validating keys and substituting unsafe ones. If the overhead is acceptable, we might decide to make the code more robust.
TODO:
test/output.go
with the expected result for the current code, submit PR for discussiongo test -bench=.
before and after the changesAnything else you would like to add:
Brought up in #273 (comment)
/wg structured-logging
The text was updated successfully, but these errors were encountered: