Skip to content

Migration Guide 3.16

Bruno Baptista edited this page Aug 30, 2024 · 20 revisions
Table of Contents
Note

We highly recommend the use of quarkus update to update to a new version of Quarkus.

Items marked below with ⚙️ ✅ are automatically handled by quarkus update.

Micrometer

Micrometer has been upgraded from 1.12.5 to 1.13.3. One of the changes is the use of Prometheus client v1.x, however, Quarkus will keep using the old deprecated v0.x client for longer.

This requires no changes from users.

However, is for some reason you are using the old dependency in some tests:

<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
the new one is:
<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
</dependency>
MeterFilters

Beware of using bean implementations of MeterFilter to return dynamic content like:

@Singleton
public class MeterFilterProducer {

    @Inject
    RequestScopedHeader requestScopedHeader;

    @Produces
    @Singleton
    public MeterFilter addTags() {
        return new MeterFilter() {
            @Override
            public Meter.Id map(Meter.Id id) {
                if (id.getName().startsWith("something")) {
                    return id.withTag(Tag.of("my-header-tag", requestScopedHeader.getHeaderValue()));
                } else {
                    return id;
                }
            }
        };
    }
}
It is supposed the returned content to be constant and not depend on runtime. There are meter caching changes on Micrometer 1.13+ that will break metrics depending on this code.

In Quarkus, the recommended way to add tags containing data from HTTP requests is using the HttpServerMetricsTagsContributor.

Migration guides

Current version


LTS versions


Next version in main


Clone this wiki locally