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

[rate] add canonical_rate + feature flag for the feature #154

Merged
merged 3 commits into from
Aug 29, 2017

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Aug 24, 2017

This PR adds a feature flag to enable canonical rate behavior for counters/rates such that a negative rate would not be reported. A legit negative rate would typically represent a metric that should be reported as a gauge. Because the former inconsistent behavior has been present in jmxfetch for a while, and to avoid breaking alerts and dashboards, we will put this behind a feature flag for now.

Based off #146

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.

Looks good! Made a small comment.

Let's document this option in the jmx.yaml.example file of dd-agent 👍

boolean submit = (!Double.isNaN(rate) && !Double.isInfinite(rate));
submit &= (rate >= 0 | !canonicalRate);

if (submit) {
sendMetricPoint(metricType, metricName, rate, tags);
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think we should log something when we don't submit a metric because canonicalRate is enabled, could ease troubleshooting missing rates.

@truthbk truthbk changed the title [rate][wip] add canonical_rate feature flag [rate] add canonical_rate feature flag Aug 24, 2017
@truthbk truthbk changed the title [rate] add canonical_rate feature flag [rate] add canonical_rate + feature flag for the feature Aug 24, 2017
@truthbk truthbk added this to the 0.16.1 milestone Aug 24, 2017
@truthbk truthbk merged commit 8767e66 into master Aug 29, 2017
@truthbk truthbk deleted the jaime/fix_counter branch August 29, 2017 10:25
@truthbk truthbk modified the milestones: 0.16.1, 0.17.0 Sep 20, 2017
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