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

Adding 'histogram' metric type to JMXFetch. #115

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

hush-hush
Copy link
Member

We now support 'histogram' type for metric (in addition of 'gauge' and 'counter').

This is a first step toward blacklisting tags (as different points may have the same tags set).

@hush-hush hush-hush force-pushed the maxime/jmxfetch-histogram branch from ba1b09c to d25f838 Compare December 7, 2016 14:39
public void assertMetric(String name, List<String> tags, int countTags, String metricType){
assertMetric(name, -1, tags, new ArrayList<String>(), countTags, metricType);
}

/**
Copy link
Member

Choose a reason for hiding this comment

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

🍰

@@ -70,7 +70,7 @@ public void sendMetrics(LinkedList<HashMap<String, Object>> metrics, String inst
String[] tags = Arrays.asList((String[]) metric.get("tags")).toArray(new String[0]);

// StatsD doesn't support rate metrics so we need to have our own aggregator to compute rates
if (!"gauge".equals(metricType)) {
if ("counter".equals(metricType)) {
Copy link
Member

Choose a reason for hiding this comment

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

I am worried that this breaks backward compatibility with configuration that did not have counter properly spelt (!"gauge".equals versus "counter".equals). What do you think?

Copy link
Member Author

@hush-hush hush-hush Dec 8, 2016

Choose a reason for hiding this comment

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

Indeed ! I will reverse the condition to explicitly catch "gauge" and "histogram".
For the next major release, I imagine that we should clarify the condition to only accept known types ?

We now support 'histogram' type for metric (in addition of 'gauge' and 'counter').
@hush-hush hush-hush force-pushed the maxime/jmxfetch-histogram branch from d25f838 to 3fee419 Compare December 8, 2016 11:09
@yannmh
Copy link
Member

yannmh commented Dec 8, 2016

:shipit:

@hush-hush hush-hush merged commit 278ed52 into master Dec 8, 2016
@hush-hush hush-hush deleted the maxime/jmxfetch-histogram branch December 8, 2016 17:10
@olivielpeau olivielpeau added this to the 0.13.0 milestone Jan 31, 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