Member-only story
Distributed Tracing with Spring Boot 3 — Micrometer vs OpenTelemetry
Spring Boot 3 recommends Micrometer for Distributed Tracing. But can OpenTelemetry Auto Instrumentation be a better starting point? Let’s find out.
Distributed Tracing is a powerful way to gain insights into the runtime behaviour of an application. But even in 2024, logs and metrics are almost exclusively relied upon when that inevitable incident strikes. And to make things even more challenging, the libraries to enable tracing are still maturing.
Take Spring Boot for example. With Spring Boot 3 came many changes, but Observability with Distributed Tracing had a drastic change. The library changed from Spring Cloud Sleuth in 2.x to Micrometer Tracing in 3.x. While the migration is not difficult, it still requires extensive work.
Even with Micrometer, there are multiple ways to capture traces which can be confusing at first. Unfortunately, there is no “Getting started” guide either in Spring or Micrometer documentation which can provide clear instructions for beginners to add tracing to their existing Spring applications. Let’s try to fix it.