Migrate Spring Cloud Sleuth 3.1 to Micrometer Tracing 1.0

MSAL

Spring Cloud Sleuth has been discontinued and only compatible with Spring Boot 2.x.

org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing
mod run . --recipe=org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Add logging.pattern.level for traceId and spanId
  2. Change Gradle or Maven dependency org.springframework.cloud:spring-cloud-starter-sleuth
  3. Change Gradle or Maven dependency org.springframework.cloud:spring-cloud-sleuth-otel-dependencies
  4. Change Gradle or Maven dependency org.springframework.cloud:spring-cloud-sleuth-api
  5. Change Gradle or Maven dependency org.springframework.cloud:spring-cloud-sleuth-autoconfigure
  6. Change Gradle or Maven dependency org.springframework.cloud:spring-cloud-sleuth-otel-autoconfigure
  7. Change Gradle or Maven dependency org.springframework.cloud:spring-cloud-sleuth-zipkin
  8. Add Gradle or Maven dependency org.springframework.boot:spring-boot-starter-actuator:3.0.x
  9. Add Gradle or Maven dependency io.micrometer:micrometer-tracing:1.0.x
  10. Add Gradle or Maven dependency org.springframework.boot:spring-boot-starter-aop:3.0.x
  11. Remove a Gradle or Maven dependency org.springframework.cloud:spring-cloud-sleuth-*
  12. Remove Maven managed dependency org.springframework.cloud:spring-cloud-sleuth-*
  13. Remove redundant explicit dependency and plugin versions
  14. Change type SpanFilter to SpanExportingPredicate
  15. Change type SpanIgnoringSpanFilter to SpanIgnoringSpanExportingPredicate
  16. Rename package name org.springframework.cloud.sleuth.autoconfig to org.springframework.boot.actuate.autoconfigure.tracing
  17. Rename package name org.springframework.cloud.sleuth to io.micrometer.tracing
  18. Change the key of a Spring application property
  19. Change the key of a Spring application property
  20. Delete a Spring configuration property spring.sleuth.supports-join
  21. Delete a Spring configuration property spring.sleuth.trace-id128
  22. Change the key of a Spring application property
  23. Delete a Spring configuration property spring.sleuth.sampler.rate
  24. Change the key of a Spring application property
  25. Change the key of a Spring application property
  26. Change the key of a Spring application property
  27. Change the key of a Spring application property
  28. Change the key of a Spring application property