jmxtrans / jmxtrans-agent

Java Agent based JMX metrics exporter.
MIT License
179 stars 110 forks source link

Add attribute and key name to resultName generated by ExpressionLanguageEngine #40

Closed maheshkelkar closed 9 years ago

maheshkelkar commented 9 years ago

Adding such strings make the resultName self-explanatory, especially when wildcarding the objectName or attributes.

Fixes #39

Sponsored by: Lookout, Inc.

maheshkelkar commented 9 years ago

@cyrille-leclerc Could you please take a look at this?

buildhive commented 9 years ago

jmxtrans project » jmxtrans-agent #67 SUCCESS This pull request looks good (what's this?)

maheshkelkar commented 9 years ago

@cyrille-leclerc This will break the backward compatibility for non-ExpressionLanguageEngine cases. But, for ExpressionLanguageEngine we need to add attribute & key to make the resultNames unique. Let me know what you think here

maheshkelkar commented 9 years ago

@cyrille-leclerc After some more thinking, I think we should add the attribute and/or compositeDataKey to the resultName, ONLY and ONLY if query.getAttribute() is null. Let me know what you think

maheshkelkar commented 9 years ago

@cyrille-leclerc Lets ignore this. I have a better proposal.

We can allow #attribute# and #key# to be added to the expressionLanguageEngine. So that backward compatibility is maintained and give more power to user.

E.g. resultAlias="test.%name%.#attribute#.#key#