-
Notifications
You must be signed in to change notification settings - Fork 183
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
chore: Improve and simplify logging #4194
base: master
Are you sure you want to change the base?
Conversation
cf4b55c
to
a83be7e
Compare
f5e1eee
to
e44e4be
Compare
e44e4be
to
a68dafa
Compare
Hi @m-horky - Sorry for bringing this trouble to you, as we just resolved an urgent bug within the repo. Please rebase the master branch of your fork of insights-core and then rebase this branch again. Please reach out to me for any problems when doing the rebase. Apologize again. |
a68dafa
to
1b11218
Compare
phase=os.getenv("INSIGHTS_PHASE", "unknown"), | ||
version=package_info.get("VERSION", "unknown"), | ||
path=client.__file__, | ||
arguments=" ".join(sys.argv[1:]), |
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.
hm are you sure logging sys.argv
is a good idea? it might contain credentials, eg --username
and --password
currently
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.
Those are not settable via CLI, only through the configuration file. Should we try to filter them anyways, in case someone enters it there by mistake?
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.
there's one small nit to potentially change, otherwise this LGTM
@xiangce please review as well, thanks!
1b11218
to
ed4aaff
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4194 +/- ##
==========================================
- Coverage 77.18% 77.16% -0.02%
==========================================
Files 762 763 +1
Lines 41513 41540 +27
Branches 8773 8782 +9
==========================================
+ Hits 32042 32056 +14
- Misses 8413 8422 +9
- Partials 1058 1062 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Also please wait for our QE ACK before merging. Thanks. |
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.
These logging change looks good to me. And as metioned, let's merge it after geting QE's ack
* Card ID: CCT-705 This patch will help us with identifying what is happening at given times. - Include phase, version and arguments on each phase load. Some of the information may not be necessary, as newer builds of insights-client contain logs that carry the information about phase and version. However, older builds do not, and these bits are valuable when debugging. - Include payloads, headers and file attachments in the log message, if present. This should make it easier to debug PATCH calls. BASIC authentication credentials are not included in these headers, the library adds them later when constructing the request. - Disable logging of HTTP responses for checkin. It is verbose and do not need to be logged in a file every time. Signed-off-by: mhorky <[email protected]>
ed4aaff
to
aefa1e2
Compare
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
This patch will help us with identifying what is happening at given times.