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

Make PrometheusMeterRegistry continue silently on meters with same name and different tags #2400

Merged
merged 1 commit into from Jan 21, 2021

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Jan 12, 2021

This PR changes to make PrometheusMeterRegistry continue silently on meters with same name and different tags as it seems to be an original intention based on #2068.

Fixes #2399

@izeye izeye changed the base branch from master to 1.6.x January 12, 2021 05:01
@checketts checketts self-requested a review January 13, 2021 22:08
@checketts
Copy link
Contributor

Looks great!

@shakuzen shakuzen added this to the 1.6.4 milestone Jan 14, 2021
@shakuzen shakuzen added registry: prometheus A Prometheus Registry related issue bug A general bug labels Jan 14, 2021
@shakuzen shakuzen removed the bug A general bug label Jan 21, 2021
@shakuzen shakuzen removed this from the 1.6.4 milestone Jan 21, 2021
Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed this seems to fix the behavior to match the intention. It is causing a number of users quite some confusion in #2399. I am afraid that after this fix, the confusion might be worse because there will be no error but the metrics users are expecting won't be in the Prometheus scrape either. While I'm not opposed to fixing this bug, it does seem to just kick the can down the road to users then asking why the Prometheus endpoint doesn't have what they expect. But that can be tackled in a separate change - I'm doing some more testing on the latest situation with Prometheus and different labels on the same metric name.

@angry-cellophane
Copy link

This is exactly what happened. I'm an app using micrometer + some custom registry to micrometer + prometheus.
I spent a few hours trying to figure out why some metrics don't appear after adding prometheus.
I think it would be better to make this behaviour configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
registry: prometheus A Prometheus Registry related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants