Skip to content

Instantly share code, notes, and snippets.

View barryegbert's full-sized avatar

Barry Egbert barryegbert

View GitHub Profile
@barryegbert
barryegbert / micrometer-tracing-guide.md
Created October 24, 2025 16:07
Implementation Guide: Trace & Span IDs with Micrometer Tracing in Spring Boot

Implementation Guide: Trace & Span IDs with Micrometer Tracing in Spring Boot

Goal: Add trace and span IDs to logs across Spring Boot apps and export distributed traces to your observability stack (e.g., Grafana Tempo via OpenTelemetry Collector), with sensible defaults for web, messaging, and database layers.


1) Prerequisites & Version Notes

  • Spring Boot: 3.1+ (works with 3.3/3.4). Micrometer Tracing replaces Spring Cloud Sleuth.
  • Java: 17+ (matches your standard).