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

Add GraphiteConfig#tagAsPrefix #348

Closed
jkschneider opened this issue Jan 16, 2018 · 3 comments
Closed

Add GraphiteConfig#tagAsPrefix #348

jkschneider opened this issue Jan 16, 2018 · 3 comments
Labels
spring-boot change Change is needed in Spring Boot for this issue
Milestone

Comments

@jkschneider
Copy link
Contributor

jkschneider commented Jan 16, 2018

Prefixing is a very graphite-specific thing unfortunately, so maybe we could get on board with a GraphiteConfig#prefix(). On the other hand, we haven't done this historically because the prefix folks add to Graphite metrics tend to be something like application name which really is a tag in a dimensional system. So our advice has been to add a common tag with (following this example) application name, and then override the naming convention to place that tag value in a prefix position in the name. By adding a common tag, the metric is instantly portable to more capable dimensional monitoring systems for which nobody really does prefixing.

That said, we get this request a lot for Graphite users. So much so, that I think it's safe to say the majority of Graphite users want some sort of tag-like prefix on their metrics. So perhaps a GraphiteConfig#tagAsPrefix(tagKey) would be even better. Guide the user to adding a common tag that is portable, and imbue the default Graphite naming convention with a knowledge of how to turn the specified tag key into a prefix when it is present.

@michaelmcfadyen
Copy link
Contributor

In the past I have used multiple elements combined as the Graphite prefix ie. <app>.<hostname>.
So could the GraphiteConfig#tagAsPrefix(tagKey) method definition support multiple tags and be GraphiteConfig#tagAsPrefix(tagKeys...)? You would have to derive the order of tags when building the prefix from the order they are passed in.

@jkschneider
Copy link
Contributor Author

@michaelmcfadyen Sure, sounds like a good idea!

@jkschneider
Copy link
Contributor Author

Fixed in 7f1e0f4

@jkschneider jkschneider added the spring-boot change Change is needed in Spring Boot for this issue label Jan 17, 2018
@jkschneider jkschneider modified the milestones: 1.0.0, 1.0.0-rc.8 Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spring-boot change Change is needed in Spring Boot for this issue
Projects
None yet
Development

No branches or pull requests

2 participants