What is Micrometer Tracing in spring boot 3?

Micrometer Tracing is the distributed tracing facade introduced in Spring Boot 3, replacing Spring Cloud Sleuth, that instruments application code to capture trace and span data and forwards it to tracing backends like Zipkin or OpenTelemetry-compatible systems.

Key Points: • Micrometer Tracing provides a vendor-neutral API, so the same instrumentation code works with different tracing backends via pluggable bridges. • It automatically propagates traceId and spanId across HTTP calls, messaging, and other instrumented components. • It complements Micrometer Metrics, giving both metrics and traces through a consistent, unified Micrometer-based observability model. • Spring Boot 3 auto-configures Micrometer Tracing when the appropriate bridge dependency, such as micrometer-tracing-bridge-brave, is on the classpath. • It integrates cleanly with Spring Boot 3's broader move toward Observation API-based instrumentation across the framework.

Example: Adding micrometer-tracing-bridge-brave and zipkin-reporter-brave to a Spring Boot 3 project automatically instruments incoming and outgoing HTTP requests with trace and span IDs, visible in a running Zipkin instance without writing custom tracing code.

Code Example:

management.tracing.sampling.probability=1.0
management.zipkin.tracing.endpoint=http://localhost:9411/api/v2/spans

Interview Tip: A concise interview answer is:

"Micrometer Tracing is Spring Boot 3's replacement for Spring Cloud Sleuth, providing a vendor-neutral tracing API that captures traceId and spanId across service calls and forwards them to backends like Zipkin through pluggable bridges. It ties into the same Micrometer ecosystem used for metrics, giving a unified observability story."