-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 lazy logging format #5398
Use lazy logging format #5398
Conversation
Codecov Report
|
Codecov Report
|
894abb5
to
7f54c7d
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.
) | ||
'`collect_status_metrics_by_host` is enabled but no host info could be extracted from HAProxy ' | ||
'stats endpoint for %s', | ||
service, |
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.
Note: service
service was unassigned at this point. That's why service, _, status = host_status
has been moved upward.
@@ -411,7 +411,7 @@ def _check_slowlog(self, instance, custom_tags): | |||
max_slow_entries = int(conn.config_get(MAX_SLOW_ENTRIES_KEY)[MAX_SLOW_ENTRIES_KEY]) | |||
if max_slow_entries > DEFAULT_MAX_SLOW_ENTRIES: | |||
self.warning( | |||
"Redis {0} is higher than {1}. Defaulting to {1}. " | |||
"Redis {0} is higher than {1}. Defaulting to {1}. " # noqa: G001 |
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.
Note: this case is somewhat legit, hence noqa
except socket.gaierror as e: | ||
err_code, message = e.args | ||
if err_code == socket.EAI_NODATA or err_code == socket.EAI_NONAME: | ||
raise socket.error('Unable to resolve host, check your DNS: {}'.format(message)) | ||
raise socket.error('Unable to resolve host, check your DNS: {}'.format(message)) # noqa: G |
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.
Note: seems to be a bug in linter, not sure why it's catching this case (will have a look at the plugin code later)
What does this PR do?
Use lazy logging format for ALL integrations in
integrations-core
.Will enforce the rule in another PR.
ddev
is used for integrations extras/internal, so, we need to fix them too, should be faster though since there is less code.CI results with logging linter enabled: #5400 (
PR All
is green)Motivation
Better logging.
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached