[9.1.1.1] graphite-emitter whitelist and specifying dimensions

Hi,

We’re using grahite-emitter with the json whitelist. What is the expected behavior when you select a metric, but don’t put any of the dimensions for that metric in the array?

For example, the historical metric “segment/size”, listed like this in the whitelist json:

"segment/size": []  # *not* specifying "dataSource" here...

This outputs a metric in graphite where there is no dimension in the metric path, e.g.:

historical.<druid_host>.segment.size

But what is the emitted metric here? I'd think it might be an aggregation (sum) of this metric across all the dataSource dimensions. But guessing based on observed values it looks like it might just be picking one of the dataSource dimensions and exporting that? I.e., we have two data sources, one is 100 G and one is 20 G. If we configured it with "segment/size": ["dataSource"] I think we'd see the metric "historical.<druid_host>.bigDataSource.segment.size" at 100 G and another "historical.<druid_host>.smallDataSource.segment.size" at 20 G. But configured with "segment/size": [] we are just seeing "historical.<druid_host>.segment.size" at 20 G.

I guess it's easy enough to configure to emit the "dataSource" dimension, but it's pretty confusing behavior if you leave it out, and the example default whitelist json file has many metrics configured that way.

AFAIK, the graphite-emitter does NOT aggregate the metrics and just emits them with the set of specified dimensions.
So, In above case when dataSource is not emitted, it will emit multiple events with same name, I am not sure how graphite handles this case.

I agree its a bit confusing and the documentation can be improved to make it more clear. It would be great if you could submit a PR for that or file an issue.