Spring Boot 3.3 is releasing today! And once again it contains a lot of useful observability changes and improvements.
Table of Contents
Observability was a key focus for the Spring team in this release, and the importance of production-ready applications was once again underscored during the latest Spring Office Hours hosted by Dan Vega, Jonathan Ivanov, and Tommy Ludwig. The stream was inspiring, so I decided to share a short post about the interesting enhancements in observability.
“In organizations with hundreds of different services talking to each other, observability is critical. Without it, you’re just not going to know what’s going on. That’s one of the big criticisms of the whole microservice movement: you have many more applications and instances, making it difficult to understand what’s happening. That’s where observability becomes very critical, and these particular features feel almost magical in their utility.” Tommy Ludwig.
Here are 7 observability enhancements
Rabbit
observations can be enabled for simple/direct/stream listeners, and on RabbitTemplate using properties.
Jersey
- Micrometer 1.13+ requires us to add a dependency on org.glassfish.jersey.ext:jersey-micrometer as the Jersey support has been deprecated.
- MetricsApplicationEventListener has been replaced by ObservationApplicationEventListener
- tag customization is now handled through a JerseyObservationConvention bean rather than JerseyTagsProvider
Micrometer
@SpanTag is now supported
OpenTelemetry
Support for tagged fields has been added
Brave
- Support for tagged and local fields has been added
- upgrade to 6.0
Zipkin
Upgrade to 3.0 thus enabling us to: define different encodings, dynamic endpoint sources, …
Prometheus
Spring boot 3.3 now supports the https://github.com/prometheus/client_java/releases/tag/v1.0.0[Prometheus 1.* client]. Do note that it contains some breaking changes such as the exported metric names, and the use of the https://github.com/prometheus/pushgateway[Prometheus push gateway] is not supported yet. If this poses an impediment and you want to continue using the 0.* version then you should remove the `io.micrometer:micrometer-registry-prometheus` and add `io.micrometer:micrometer-registry-prometheus-simpleclient`
If you don’t the auto-configuration won’t work!
New properties
We’ve once again received some observability enhancements: We’ve once again received some observability enhancements
Name | Default value | Description |
management.info.process.enabled | false | Whether to enable the new process InfoContributor. |
spring.rabbitmq.listener.direct.observation-enabled | false | Whether to enable observation. |
spring.rabbitmq.listener.stream.observation-enabled | false | Whether to enable observation. |
spring.rabbitmq.template.observation-enabled | false | Whether to enable observation. |
management.observations.long-task-timer.enabled | false | Whether to enable observation. |
management.observations.long-task-timer.enabled | false | Whether a LongTaskTimer should be created for every observation. |
Changed properties
Name | New value | Previous value | spring.pulsar.listener.observation-enabled |
false | true | spring.pulsar.template.observations-enabled | false |
Varia
While not directly observability related, do keep in mind in case you’re using Gradle, and the native build tools to build your project for GraalVM you’ll need to make certain you’re using at least version 0.10.0 of the plugin.
Conclusion: Spring Boot 3.3: Observability Enhancements
As always, there are a lot of interesting enhancements observability-wise.
I can highly recommend using the Digma plugin to easily view your ingested observation in IntelliJ. Digma smoothly integrates with JetBrains so you don’t even need to leave your development environment and automatically get certain insights for problematic queries such as N+1 issues when querying data
Digma uses OpenTelemetry behind the scenes to collect data about the code. To get started, all you have to do is install Digma from the IntelliJ marketplace and run your code. Even locally you can gather a log of data just by activating your code or running tests. You can get even more comprehensive data by connecting Digma with a CI, Staging, or Production environment.
Digma Continuous Feedback Plugin
I also recommend perusing the Spring Boot 3.3 release notes.
***This article was contributed to the Digma blog by Simon Verhoeven, a Senior Software Engineer and Java Consultant with a particular focus on Cloud quality and Maintainability.