Skip to content

Fix Prometheus registry metadata for prom-client-java upgrades#7460

Closed
zeitlinger wants to merge 8 commits into
micrometer-metrics:mainfrom
zeitlinger:prom-client-java-compat-prototype
Closed

Fix Prometheus registry metadata for prom-client-java upgrades#7460
zeitlinger wants to merge 8 commits into
micrometer-metrics:mainfrom
zeitlinger:prom-client-java-compat-prototype

Conversation

@zeitlinger
Copy link
Copy Markdown
Contributor

@zeitlinger zeitlinger commented May 5, 2026

Summary

Tests added on the Prometheus side to support repeated prom-client-java
upgrade work exposed this issue in Micrometer.

In this case, the compatibility testing did not only show a prom-side problem.
It also showed a necessary Micrometer-side change in the prometheusmetrics
adapter.

This draft contains the change we currently believe Micrometer will need when
moving to the newer prom-client-java release line.

What this changes

  • expose the actual Prometheus family metadata from MicrometerCollector
  • align registration-time metadata in PrometheusMeterRegistry with the
    MetricSnapshot metadata used at scrape time
  • make collision validation use the same names, types, and labels that the
    scrape path will actually emit

Why this is draft

We'd like feedback from Micrometer maintainers on whether this is the right
Micrometer-side fix.

Context

zeitlinger added 5 commits May 4, 2026 11:41
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger marked this pull request as ready for review May 5, 2026 16:50
zeitlinger added 2 commits May 6, 2026 08:09
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger marked this pull request as draft May 6, 2026 09:26
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger marked this pull request as ready for review May 7, 2026 12:13
@zeitlinger
Copy link
Copy Markdown
Contributor Author

I made it ready for review - let me know what you think.

@zeitlinger zeitlinger marked this pull request as draft May 13, 2026 10:53
@zeitlinger
Copy link
Copy Markdown
Contributor Author

Superseded by #7487, which switches Micrometer to the new typed family descriptor API from prometheus/client_java#2114. Closing this older prototype so review can focus on the end-state design.

@zeitlinger zeitlinger closed this May 13, 2026
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

Successfully merging this pull request may close these issues.

1 participant