As part of https://github.com/spring-projects/spring-boot/issues/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

Comment From: wilkinsona

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

Comment From: jonatan-ivanov

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);

Comment From: mhalbritter

Superseded by https://github.com/spring-projects/spring-boot/pull/40023.