Skip to content
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

[wheel] Don't spam logs with exceptions when checks aren't wheels #3620

Merged
merged 1 commit into from
Dec 29, 2017

Conversation

olivielpeau
Copy link
Member

What does this PR do?

Avoids spamming logs with exceptions when checks aren't wheels.

We always try to load the checks as wheel-installed checks, but it's
not an error if the checks are installed differently, so avoid logging with
exception level.

Motivation

Without this, we get this error in the logs for every check that's enabled, on agent startup:

2017-12-29 13:12:34 UTC | ERROR | dd.collector | config(config.py:872) | Unable to import check module process from site-packages
Traceback (most recent call last):
  File "/opt/datadog-agent/agent/config.py", line 869, in _get_check_module
    check_module = import_module("datadog_checks.{}".format(check_name))
  File "/opt/datadog-agent/embedded/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named datadog_checks.process

We always try to load the checks as wheel-installed checks, but it's
not an error if they're installed otherwise, so avoid logging with
exception level.
@olivielpeau olivielpeau added this to the 5.21.0 milestone Dec 29, 2017
Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks! 👌

@olivielpeau olivielpeau merged commit e49cbce into master Dec 29, 2017
@olivielpeau olivielpeau deleted the olivielpeau/wheel-check-import-log branch December 29, 2017 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants