Skip to content

Deprecate support for io.micrometer.prometheus.PrometheusMeterRegistry in favor of io.micrometer.prometheusmetrics.PrometheusMeterRegistry #39904

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

Closed
wilkinsona opened this issue Mar 12, 2024 · 3 comments
Labels
status: superseded An issue that has been superseded by another

Comments

@wilkinsona
Copy link
Member

As part of #39889, a number of deprecation warnings have been suppressed. This was done to adapt to changes in Micrometer as simply as possible, but we'll have to do more in the longer term.

Micrometer 1.13 has introduced a new module, io.micrometer:micrometer-registry-prometheus-simpleclient, that contains the old io.micrometer.prometheus.PrometheusMeterRegistry and related classes in a deprecated form. The existing io.micrometer:micrometer-registry-prometheus module now contains new code for use with the new Prometheus client. As things stand after #39889, we only support the former and users will have to depend on micrometer-registry-prometheus-simpleclient rather than io.micrometer:micrometer-registry-prometheus to use Boot's Prometheus auto-configuration.

Given these changes, we need to deprecate our support for micrometer-registry-prometheus-simpleclient and introduce support for io.micrometer:micrometer-registry-prometheus. It remains to be seen how complicated this will be. Ideally, we'd be able to use the same configuration properties but:

  • there may be some differences in the properties offered by the two modules
  • we reference the now-deprecated io.micrometer.prometheus.HistogramFlavor in PrometheusProperties
@wilkinsona wilkinsona added the type: enhancement A general enhancement label Mar 12, 2024
@wilkinsona wilkinsona added this to the 3.3.x milestone Mar 12, 2024
@wilkinsona
Copy link
Member Author

wilkinsona commented Mar 12, 2024

I have added an entry to the release notes for Boot 3.3.0-M3 to describe the current situation.

@jonatan-ivanov
Copy link
Member

Fyi: this is not realy Micrometer related but there is a bridge for simple client (0.x) -> new client (1.x): io.prometheus:prometheus-metrics-simpleclient-bridge, see docs. It can make the data that was added to the old prometheus registry (CollectorRegistry) available in the new prometheus registry (PrometheusRegistry) but not the other way. This can be handy for users who use the old Prometheus API directly: when Boot scrapes the new PrometheusRegistry, it will contain all the data that was added by the old simpleclient (0.x) API.

The documented setup is a static call:

SimpleclientCollector.builder()
    .collectorRegistry(oldCollectorRegistry)
    .register(newPrometheusRegistry);

but it does something like this under the hood which can be auto-configured in Boot:

SimpleclientCollector simpleclientCollector = SimpleclientCollector.builder().collectorRegistry(oldCollectorRegistry).build();
newPrometheusRegistry.register(simpleclientCollector);

@mhalbritter
Copy link
Contributor

Superseded by #40023.

@mhalbritter mhalbritter closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2024
@mhalbritter mhalbritter removed this from the 3.3.x milestone Mar 26, 2024
@mhalbritter mhalbritter added status: superseded An issue that has been superseded by another and removed type: enhancement A general enhancement labels Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

3 participants