The Spring Blog

News and Events

Micrometer: Spring Boot 2's new application metrics collector

What is it?

Micrometer is a dimensional-first metrics collection facade whose aim is to allow you to time, count, and gauge your code with a vendor neutral API. Through classpath and configuration, you may select one or several monitoring systems to export your metrics data to. Think of it like SLF4J, but for metrics!

Micrometer is the metrics collection facility included in Spring Boot 2’s Actuator. It has also been backported to Spring Boot 1.5, 1.4, and 1.3 with the addition of another dependency.

Micrometer adds richer meter primitives to the counters and gauges that existed in Spring Boot 1. For example, a single Micrometer Timer is capable of producing time series related to throughput, total time, maximum latency of recent samples, pre-computed percentiles, percentile histograms, and SLA boundary counts.

An Kibana-rendered timer

Despite its focus on dimensional metrics, Micrometer does map to hierarchical names to continue to serve older monitoring solutions like Ganglia or narrower scoped tools like JMX. The change to Micrometer arose out of a desire to better serve a wave of dimensional monitoring systems (think Prometheus, Datadog, Wavefront, SignalFx, Influx, etc). One of Spring’s strengths is the enablement of choice through abstraction. By integrating with Micrometer, Spring Boot is enabling you to choose one or more monitoring systems to use today, and change your mind later as your needs change without requiring a rewrite of your custom metrics instrumentation.

Before opting to develop "yet another" metrics collection library, we looked hard at existing or up-and-coming dimensional collectors. But as we looked at exporting to more and more monitoring systems, the importance of the structure of names and data became apparent. Micrometer builds in concepts of naming convention normalization, base unit of time scaling, and support for proprietary expressions of structures like histogram data that are essential to make metrics shine in each target system. Along the way, we added meter filtering as well, allowing you to exercise greater control over the instrumentation of your upstream dependencies.

To learn more about Micrometer’s capabilities, please refer to its reference documentation, in particular the concepts section.

Spring Security SAML 1.0.4 Released

The Spring Security SAML project team is proud to announce our latest 1.0.4.RELEASE. This maintenance release pushes its dependencies to the latest known working version while staying backwards compatible.

This release requires an additional Maven repository to download the latest version of the not-yet-commons-ssl dependency.

Moving forward we will be working on our 2.0.0 release. This release aims to provide an easy upgrade path for users of the 1.0.x releases while modernizing the underlying dependencies for easy up keep.


Spring Cloud Open Service Broker M1 released

We are pleased to announce the first milestone release of Spring Cloud Open Service Broker 2.0.0.

This project was formerly named Spring Cloud - Cloud Foundry Service Broker. A lot has changed in the few years since that project was released. The service broker API that the project implements is no longer specific to Cloud Foundry but has been donated to the Open Service Broker API project and is implemented by Kubernetes and other platforms. The new project name reflects this evolution and openness.


This Week in Spring - March 13th, 2018

Hi Spring fans! Welcome to another installment of This Week in Spring! This week I’m in blizzard-besieged Boston, Massachusetts, for the epic Spring One Tour Boston event. Unfortunately, due to this crazy snow storm / blizzard, the event’s been postponed one day as we all grapple with the weather. Hope you were able to join the Spring Boot 2.0 launch webinar! If not the replay will be available here and don’t forget to check out the launch blog!

Snow or no snow! The show must go on, at least here on the Spring blog, so without further ado:


Spring Cloud Data Flow 1.4 RC1 released

The Spring Cloud Data Flow team is pleased to announce the release of 1.4.0 RC1. Follow the Getting Started guides for Local Server, Cloud Foundry, and Kubernetes.

Following are the release highlights:

Stream Deployment UX

In Skipper mode, we have added a brand new stream deployment builder form to simplify the selection of platform and the properties while deploying a stream. The options include override to the deployment platform and the deployer, application and global properties for the streaming pipeline.

Deployment Properties

Spring IO Platform Cairo-RC1

It’s my pleasure to announce that Spring IO Platform Cairo-RC1 is now available from the Spring milestone repository. The Cairo generation of the Platform builds on top of Spring Framework 5.0 and Spring Boot 2.0 and requires Java 8.

Cairo includes the following projects:

  • AspectJ 1.8.13
  • Reactor Bismuth-SR7
  • Spring AMQP 2.0.2
  • Spring Batch 4.0.0
  • Spring Boot 2.0.0
  • Spring Cloud Connectors 2.0.1
  • Spring Data Kay-SR5
  • Spring Framework 5.0.4
  • Spring HATEOAS 0.24.0
  • Spring Integration 5.0.3
  • Spring Kafka 2.1.4
  • Spring LDAP 2.3.2
  • Spring Plugin 1.2.0
  • Spring REST Docs 2.0.0
  • Spring Retry 1.2.2
  • Spring Security 5.0.3
  • Spring Security JWT 1.0.9
  • Spring Security OAuth 2.2.1
  • Spring Session Apple-SR1
  • Spring Social 1.1.6
  • Spring Social Twitter 1.1.2
  • Spring Web Flow 2.5.0
  • Spring Web Services 3.0.0

Upgrading to Spring Boot 2

Spring Boot 2 was released recently and the production instance of Spring Initializr ( was upgraded to Spring Boot 2 the same day.

In this post, I’d like to walk you through the process of upgrading a Spring Boot 1.x app to Spring Boot 2.

Release notes and migration guide

A good first step is to get yourself familiar with the main changes in Spring Boot 2 by reading the migration guide and the release notes.

Build upgrade

If you are using Maven and the spring-boot-starter-parent, you need to be aware that several plugins are going to be updated as part of the upgrade. If you’re not using the parent, it is worthwhile to inspect your build and upgrade the plugins that you are using. Spring Initializr is built with Maven so the easiest way is to scan spring-boot-dependencies and upgrade the plugins you are using if necessary.


Testing auto-configurations with Spring Boot 2.0

Auto-configuration is one of the most powerful features of Spring Boot. Tests for auto-configuration classes usually follow the same pattern. Most tests start up an ApplicationContext with the auto-configuration class under test and depending on the test, also load additional configuration to simulate user behavior. The recurrence of this pattern can add a lot of repetition in the code base.

Spring Boot 2.0 provides a suite of new test helpers for easily configuring an ApplicationContext to simulate auto-configuration test scenarios. The following example configures an ApplicationContextRunner to test the UserServiceAutoConfiguration: