-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
✨ Improve webhook loggings #439
✨ Improve webhook loggings #439
Conversation
827c67f
to
218153a
Compare
pkg/webhook/server.go
Outdated
@@ -132,6 +134,7 @@ func (s *Server) Start(stop <-chan struct{}) error { | |||
if _, err := inject.LoggerInto(baseHookLog.WithValues("webhook", hookPath), webhook); err != nil { | |||
return err | |||
} | |||
baseHookLog.Info("loaded webhook in", "webhook path", hookPath) |
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.
IMO we should put it in
controller-runtime/pkg/webhook/server.go
Line 100 in 13ee2bc
func (s *Server) Register(path string, hook http.Handler) { |
baseHookLog.Info("registering webhook", "path", path)
s.webhooks[path] = hook
s.WebhookMux.Handle(path, instrumentedHook(path, hook))
fb99b3c
to
de136cc
Compare
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.
/lgtm
Thanks for improving the logging.
de136cc
to
8805801
Compare
8805801
to
5788837
Compare
force pushed to sync with master branch |
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.
a couple of these changes (potentially) dramatically increase log volume, or log potentially large objects. need to consider this a bit
5788837
to
db2b454
Compare
Hi @DirectXMan12! Instead of logging the entire struct of admissionResponse and admissionRequest, i have selected a couple fields to be included in the logs. Plz let me know if this is okay 😃 ! |
that looks a lot better /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anthonyho007, DirectXMan12 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 |
@anthonyho007 can you please fix the failing tests? |
db2b454
to
ebf29b3
Compare
ebf29b3
to
d1c6909
Compare
/ok-to-test |
d1c6909
to
9f1771c
Compare
9f1771c
to
13d4073
Compare
/lgtm |
I have added more logs at places where it deems necessary. If you guys have any good ideas, please let me know!
Issue: #340