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

Metric names are changed in Prometheus #1063

Closed
crmky opened this issue Dec 9, 2018 · 5 comments
Closed

Metric names are changed in Prometheus #1063

crmky opened this issue Dec 9, 2018 · 5 comments
Labels
question A user question, probably better suited for StackOverflow

Comments

@crmky
Copy link
Contributor

crmky commented Dec 9, 2018

I didn't aware the baseUnit is part of the metric name in Prometheus (PrometheusNamingConvention).

Now with the change of "baseUnit" by
cf4a94c#diff-abb051f108aaf982e8a930524c212f65, several metric names are changed in Prometheus.

This is an incompatible change, but I didn't see this behavior is mentioned in anywhere. Do we want to keep this behavior, or remove base unit from Prometheus metric name?

@jkschneider
Copy link
Contributor

Sorry for any trouble this caused. I think the lacking units was an error of omission previously, and adding the base unit as a suffix in Prometheus does seem to be the most idiomatic for Prometheus. A MeterFilter could be used to strip units if you need, or the naming convention can be overridden if necessary.

Any other thoughts?

@jkschneider jkschneider added the question A user question, probably better suited for StackOverflow label Dec 12, 2018
@crmky
Copy link
Contributor Author

crmky commented Dec 13, 2018

I'm ok with that if you think that's the right direction for Micrometer.

My major concern is most people only consider metric name (as well as tags) as the contract, so they are free to modify other fields (description and etc). They just don't aware change baseUnit will change metric name in other MeterRegistry.

Maybe you can consider to improve document for that, especially for this one: https://micrometer.io/docs/concepts#_naming_meters

@jkschneider
Copy link
Contributor

I understand your concern. The naming section of the doc does kind of highlight how Prometheus is different. The example shows that the base unit of "seconds" is suffixed to the name.

@bbzg
Copy link

bbzg commented Jan 5, 2019

I ran into this today after upgrading Spring Boot version. Kind of jarring to go from green to red in the alerts section. Kind of... bad?

@jkschneider
Copy link
Contributor

@bbzg Sorry to cause you trouble. I'm not sure what we could really do differently. The lack of base unit was an error of omission and I think it's correct for base units to be suffixed on the Prometheus naming convention given what's idiomatic there. We try to keep metric names stable across minor releases at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A user question, probably better suited for StackOverflow
Projects
None yet
Development

No branches or pull requests

3 participants