feat: More verbose logging for audit#2503
Conversation
Signed-off-by: Max Smythe <smythe@google.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2503 +/- ##
==========================================
+ Coverage 53.88% 53.93% +0.05%
==========================================
Files 116 116
Lines 10272 10277 +5
==========================================
+ Hits 5535 5543 +8
+ Misses 4311 4309 -2
+ Partials 426 425 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
would we want any of these to be using |
| for gv, gvKinds := range clusterAPIResources { | ||
| kindsLoop: | ||
| for kind := range gvKinds { | ||
| log.Info("Listing objects for GVK", "group", gv.Group, "version", gv.Version, "kind", kind) |
There was a problem hiding this comment.
Did we want this line and the following to actual use the manager log? am.log. Before we call auditResources we actually tag the audit manager log w the auditID which could be used to aggregate audit runs.
There was a problem hiding this comment.
but that one defaults to always log. +1 on exposing verbosity to the operator so it doesn't flood the logs unless you need it.
There was a problem hiding this comment.
oops, yes, am.log() is a better call.
@ritazh I think logging/not logging is governed by the log level flag?
Signed-off-by: Max Smythe <smythe@google.com>
|
addressed feedback |
* feat: More verbose logging for audit Signed-off-by: Max Smythe <smythe@google.com> * Reduce log priority Signed-off-by: Max Smythe <smythe@google.com> Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe smythe@google.com
What this PR does / why we need it:
This will help diagnose performance issues in audit, such as those mentioned in #2502
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: