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.

Abhinav Sonkar
ITNEXT
9 min readJan 20, 2024

--

Photo by Christopher Burns on Unsplash

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.

Getting Started with Micrometer Tracing

--

--

Published in ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Responses (1)

Write a response