What’s new with MicroProfile 6.1?

Photo of Alfonso Altamirano by Alfonso Altamirano

The latest release of MicroProfile - 6.1 - was delivered in October and it comes with some changes and new fuctionalities - we will take you through those in this article, so carry on reading if you want to find out more on what's new in MicroProfile!

The new release of MicroProfile 6.1 brings a few little changes and is considered a minor release. To see exactly what changed, have a look at the diagram below:


For more information, please check official site for MicroProfile 6.1

Specs that changed

As you saw from the previous diagram only few specs changed. In the next sections I will show what changes were added on each of them.

MicroProfile Config 3.1

For this specification most of the changes added were regarding the following:

  • TCK Improvements
  • Upgrade of documentation to clarify usage

To review full list of changes please check official site for MicroProfile Config 3.1

MicroProfile Telemetry 1.1

Here one of the most important changes were the upgrade of the OpenTelemetry Java V1.29.0 that is used now internally and the usage of the OpenTelemetry Tracing v1.26.0. Additional to the previous, Telemetry 1.1 have the following:

  • TCK improvements
  • Upgrade documentation to clarify usage

To review full list of changes please check official site for MicroProfile Telemetry 1.1

MicroProfile Metrics 5.1

In this specification more interesting changes beyond the TCK Improvements and the documentation changes were added.

Now with metrics we can customize percentiles and buckets, these values are used commonly with Histogram and Timer metrics.

To show how this works, see the following example:

First, we need a Rest endpoint for each of the metrics that we need. Here the class:

public class MetricController {

private Logger logger = Logger.getLogger(MetricController.class.getName());

HistogramConfigBean bean;

TimerConfigBean timerBean;

public String callHistogram() {
bean.injectedHistogram.update((int)(Math.random() * 10000.0));
return "Histogram called";

public String callTimer() {
LocalDateTime starting = LocalDateTime.now();
int wait = new Random().nextInt(5000);
try {
} catch (InterruptedException e) {
LocalDateTime end = LocalDateTime.now();
Duration d = Duration.between(starting, end);
logger.info("Duration for timer:"+d.toString());
return "calling timer";


This class need the following two classes: HistogramConfigBean and TimerConfigBean, since those define each specific metric and those are injected into the MetricController class.

Here the code of both:

public class HistogramConfigBean {
@Metric(name = "injectedHistogram")
public Histogram injectedHistogram;
public class TimerConfigBean {
public Timer injectedTimer;

Then, we need to indicate that we want to use our custom percentiles and custom buckets by adding the following properties on our microprofile-config.properties file:

  • new properties
    • mp.metrics.distribution.histogram.buckets
    • mp.metrics.distribution.percentiles
    • mp.metrics.distribution.timer.buckets

The rules to apply each of them are explained in the documentation here

With each of them we are telling to get and use values to configure custom percentiles and custom buckets for each of the metrics. For our example here the values of the properties:


I'm configuring for the metric HistogramConfigBean.injectedHistogram 3 custom percentiles and for TimerConfigBean.injectedTimer  5 custom percentiles. In the case of buckets I'm adding for HistogramConfigBean.injectedHistogram 5 custom buckets and for TimerConfigBean.injectedTimer  6 custom buckets.

Difference between percentile and buckets

An important thing to explain is the difference between percentile and a bucket. A percentile is a value that represents a percentage from the amount of data to evaluate, while the bucket is a specific value that contains the total amount of occurrences from the values that is less or equal to the bucket value. 

To test our example we just need to start our application with Payara Micro and we need to call multiple times each of the endpoints.

Payara Micro startup with demo application:

Calling timer endpoint:

Calling histogram endpoint:

Finally we can open the applications metrics to see the Prometheus format of the metrics

If you want to check more details of the Prometheus format please check following page

Monitor the metrics with different tools

As you saw from the resulting output, that is not very readable. That is why you can configure other tools like Prometheus UI tool and Graphana to have a more readable way to explore metrics. Here are the links to review how to install those tools:

After doing configuration and installation then you can see the previous data on a very interesting view:

Prometheus quantile review

Prometheus bucket review

Graphana quantile review

Prometheus bucket review

To review full list of changes please check official site for MicroProfile Metrics 5.1


You can see that although little changes were added to the new release of MicroProfile 6.1, it is important to understand and use the new capabilities. For the best results, make sure you use MicroProfile 6.1 with the latest version of Payara Platform - download here!


Want to learn more about using MicroProfile? Check out our guides and other educational resources!

MicroProfile Resources


Related Posts