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

Namespacing conversion #108

Open
Tenchi2xh opened this issue Jul 31, 2017 · 2 comments
Open

Namespacing conversion #108

Tenchi2xh opened this issue Jul 31, 2017 · 2 comments

Comments

@Tenchi2xh
Copy link

Tenchi2xh commented Jul 31, 2017

I was wondering if converting all the dots in a bean name (using %name% in the configuration) being transformed to underscores is a specific design decision?

At this line adding the optional second parameter to false would keep the dots.

It made querying Graphite unpractical since names were really long instead of having easy namespaces, for example service.http-server.akka-http-server_200_count instead of service.http-server.akka-http-server.200.count

Edit: here are the type of beans I am currently exporting:

screen shot 2017-07-31 at 15 23 47

@kerlandsson
Copy link
Member

I think the reasoning behind this is that when using %name% it is hard to know beforehand how many dots the name will contain. E.g. the bean can dynamically pull its name from a system that has no knowledge that dots are special characters for a monitoring system somewhere. Hence the dots are escaped to make it deterministic how many dots the name will contain, for example to ensure that the metric ends up in the same Graphite folder always.

@gehel
Copy link
Member

gehel commented Aug 11, 2017

@kerlandsson has a pretty good explanation. The idea is that we want the Graphite hierarchy to match the JMX hierarchy. A bean name is a single component in the JMX hierarchy, so we don't want to split it on . which might or might not be the intent of whoever wrote the JMX bean.

Note that internally, jmxtrans uses String to represent those hierarchies, instead of a more abstract structure. This causes all kind of complications. This should be refactored at some point, which should enable making smarter decisions about how we rewrite bean names (or not rewrite them).

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

No branches or pull requests

3 participants