-
Notifications
You must be signed in to change notification settings - Fork 702
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
Use structured logs in kubeapp-apis service #4949
Use structured logs in kubeapp-apis service #4949
Conversation
✅ Deploy Preview for kubeapps-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Awesome, thanks for the effort! LGTM
However, I've carried out a quick search of log.Infof(
, log.Info(
, log.Errorf
and there are still some matches in the source code. Do you have intentions to also update them?
Besides, we also have log.Warning(
, log.Warningf(
, but according to klog (ErrorS structured logs to the ERROR, WARNING, and INFO logs.), it seems that the warnings are also logged using the ErrorS
.
Happy to accept and land this PR or leave it open if you want to send more changes and move every log trace to the structured format.
Again, thanks for the effort :)
Hey @antgamdia I agree that there are still some references of |
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/chart_cache.go cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/github_oci_repo_lister.go cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/oci_repo.go
Great! Will do that way then. After the v2.4.6 release we have started merging pending PRs we had, so some conflicts have emerged. However, I've just solved them and as soon as the CI check go green, I'll merge the PR :) |
Cool, Thanks for quick response. |
Please finish this work. In the the current state it is difficult to read the server log because of inconsistent formatting of the messages, e.g.:
|
Description of the change
This PR uses structured logs wherever possible. The changes are scoped to
kubeapp-apis
service and dependent package.Benefits
Using structured logs would make automated parsing of the logs easy
Possible drawbacks
NA
Applicable issues
log.InfoS(...)
) #4193Additional information