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

Seth/cassandra metrics update #50

Closed
wants to merge 7 commits into from

Conversation

sethrosenblum
Copy link
Contributor

This allows jmxfetch to properly map the new metrics structure from Cassandra to something more usable. This is intended to fix #6.

Cassandra Metrics Reference

This change does several things:

  • Maintains parity for the deprecated Cassandra namespaces
  • Remaps metric names to cassandra.$metric or cassandra.$metric.$attribute
  • Drops name:$name tag because of redundancy
  • Renames scope:$scope to $type:$scope so users can continue to use 'columnfamily:mytable`, for instance

I also did some refactoring around moving post processing back into the processing of a metric and reusing domain. I can break that into a separate Pull Request if that's preferable.

@yannmh yannmh added this to the 5.4.0 milestone Apr 6, 2015
@yannmh
Copy link
Member

yannmh commented Apr 6, 2015

Great ! Thanks @sethrosenblum for working on this.
I'll review it. Let's aim for the 5.4.0 agent release.

}
alias = convertMetricName(alias);
return alias;
}

private String getCassandraAlias() {
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason why we don't want the same approach for JMXComplexAttribute ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cassandra doesn't produce any complex attributes.

@yannmh
Copy link
Member

yannmh commented Apr 6, 2015

Do you think you can add some tests ?

For instance we could check that we have the expected metric name, tags from a given bean (and ensure backward compatibility in the meantime).

@sethrosenblum
Copy link
Contributor Author

I had been hesitent to add a mock cassandra bean, as our other tests had all used a fake java bean. I'll see if I can make something to exercise the code path.

@yannmh
Copy link
Member

yannmh commented May 13, 2015

Hey @sethrosenblum ,

As we are changing Cassandra metric names, we are likely to introduce some backward imcompatibilities/discontinuities -same metric reporting under a different name- for some users. Are we ok with that ?

@sethrosenblum
Copy link
Contributor Author

If a user continues to use their existing cassandra.yaml with the new jmxfetch, their metric names should stay the same, and they shouldn't see any difference. When we release a new cassandra.yaml to take advantage of the new cassandra namespace, then users will see a name change as the metric data being presented is quite different.

@yannmh
Copy link
Member

yannmh commented May 13, 2015

Custom metrics defined in cassandra.yaml without an alias would still be impacted.
I remember having seen some cassandra.metrics.$value style metric name among users (cc @amankapur ).

@yannmh
Copy link
Member

yannmh commented May 13, 2015

It's definitely breaking backward compatibility when users have these 'new-style' metrics set as custom and no aliases (I counted at least 9 users).

We can bump JMXFetch version to 1.0.0. Also we might want to reach out the concerned users as it would be embedded by default with Datadog agent 5.4.0.
@remh any thoughts ?

@yannmh yannmh force-pushed the seth/cassandra_metrics_update branch from b43d7c2 to 7088f31 Compare May 13, 2015 23:29
@@ -60,8 +60,6 @@ public void sendMetrics(LinkedList<HashMap<String, Object>> metrics, String inst
// We need to edit metrics for legacy reasons (rename metrics, etc)
HashMap<String, Object> metric = new HashMap<String, Object>(m);

postProcess(metric);
Copy link
Member

Choose a reason for hiding this comment

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

Should this method be removed ?

@yannmh
Copy link
Member

yannmh commented May 20, 2015

Let's postpone theses changes to the 5.5.0 agent release: it'll give us more time to handle the transition.

Also, it may worth a shot double checking the (non?)existence of JMXComplexAttributes for Cassandra metrics.

@yannmh yannmh modified the milestones: 5.4.0, 5.5.0 May 20, 2015
@yannmh
Copy link
Member

yannmh commented Jul 27, 2015

JMX attribute types over my Cassandra (version: 2.0.13) instance:

'double',
'java.lang.Object',
'java.lang.String',
'long'

None of them is part of JMXComplexAttributesdefinition.

@remh remh modified the milestones: 5.6.0, 5.5.0 Sep 1, 2015
@yannmh
Copy link
Member

yannmh commented Oct 20, 2015

Closing in favor of #79

@yannmh yannmh deleted the seth/cassandra_metrics_update branch January 14, 2016 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cassandra metrics change starting with version 1.2
3 participants