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

Fix service checks in the JSON reporter #278

Merged
merged 4 commits into from
Mar 12, 2020

Conversation

therve
Copy link
Collaborator

@therve therve commented Mar 2, 2020

This uses the wrong service check name and doesn't produce the proper
value compared to the statsd reporter.

This uses the wrong service check name and doesn't produce the proper
value compared to the statsd reporter.
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.

Definitely makes sense, thank you for this fix. I wish we would've done a better job with the original reporter OOP code.

Just added a note for what could be some more statusToServiceCheckStatus cleanup/dedupe.

@@ -38,14 +40,25 @@ protected void sendMetricPoint(
metrics.add(metric);
}

private ServiceCheck.Status statusToServiceCheckStatus(String status) {
Copy link
Member

Choose a reason for hiding this comment

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

I know this is definitely not your fault, but to avoid inconsistencies like these down the line, I think I'd rather avoid duping code. Maybe this statusToServiceCheckStatus could be a static method in org.datadog.jmxfetch.Status.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved it to the reporter class, does that sound fine?

@therve therve merged commit 37fc55f into DataDog:master Mar 12, 2020
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