-
Notifications
You must be signed in to change notification settings - Fork 70
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
Conversation
This uses the wrong service check name and doesn't produce the proper value compared to the statsd reporter.
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.
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) { |
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.
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
.
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.
I moved it to the reporter class, does that sound fine?
This uses the wrong service check name and doesn't produce the proper
value compared to the statsd reporter.