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

Only log about broken instances when they exist #280

Merged
merged 1 commit into from
May 15, 2020

Conversation

randomanderson
Copy link
Contributor

@randomanderson randomanderson commented Mar 4, 2020

The previous behavior logged something similar to:

[dd.trace 2020-03-03 18:32:28:591 -0500] [dd-jmx-collector] DEBUG org.datadog.jmxfetch.App - Trying to recover broken instances...
[dd.trace 2020-03-03 18:32:28:591 -0500] [dd-jmx-collector] DEBUG org.datadog.jmxfetch.App - Done trying to recover broken instances.

every iteration. This is noisy even at the debug level. It also lead to confusion as to whether this was an error.

This pull request only prints the above log messages when there are broken instances.

I made sure the calls outside of the main for loop don't do anything if brokenInstanceMap (and therefore fixInstanceTasks) are empty.

@prognant prognant self-requested a review May 15, 2020 18:17
Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @randomanderson!

@olivielpeau olivielpeau added this to the 0.36.2 milestone May 15, 2020
@olivielpeau olivielpeau merged commit 8004234 into master May 15, 2020
@olivielpeau olivielpeau deleted the landerson/broken-instances-logging branch May 15, 2020 18:20
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.

3 participants