Skip to content

Instantly share code, notes, and snippets.

@pramath01
pramath01 / spring-boot-4-otel-guide.md
Last active March 5, 2026 17:57
Guide for configuring OpenTelemetry with Spring Boot 4.x, including recommended dependencies and common pitfalls.

OpenTelemetry Integration with Spring Boot 4.x

Recommended Configuration and Common Pitfalls

1. Recommended Approach

For new Spring Boot 4.x applications, the preferred and supported integration path is the native starter.

  • Library: org.springframework.boot:spring-boot-starter-opentelemetry
  • Rationale: Avoids conflicts from legacy community starters and ensures full Boot 4 compatibility.