Migrate from Spring Cloud Sleuth to OpenTelemetry
MSALMigrate from Spring Cloud Sleuth to OpenTelemetry. Spring Cloud Sleuth has been deprecated and is replaced by Micrometer Tracing with OpenTelemetry as a backend. This recipe removes Sleuth dependencies and adds OpenTelemetry instrumentation.
org. openrewrite. java. spring. opentelemetry. MigrateSleuthToOpenTelemetrymod run . --recipe= org. openrewrite. java. spring. opentelemetry. MigrateSleuthToOpenTelemetryInstall 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.
- Remove a Gradle or Maven dependency
org.springframework.cloud:spring-cloud-starter-sleuth - Remove a Gradle or Maven dependency
org.springframework.cloud:spring-cloud-sleuth* - Add Gradle or Maven dependency
io.micrometer:micrometer-tracing-bridge-otel:1.x - Add Gradle or Maven dependency
io.opentelemetry:opentelemetry-exporter-otlp:1.x - Add Gradle or Maven dependency
io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.x - Add Gradle or Maven dependency
io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter:2.x - Add Gradle or Maven dependency
io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.x - Add Gradle or Maven dependency
org.springframework.boot:spring-boot-starter-aop:3.x - Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Delete a Spring configuration property
spring.sleuth.otel.config.trace-id-ratio-based - Delete a Spring configuration property
spring.sleuth.otel.resource.enabled - Change type
SpanFiltertoSpanExportingPredicate - Change type
NewSpantoWithSpan - Change type
SpanTagtoSpanAttribute - Change type
ContinueSpantoWithSpan - Rename package name
org.springframework.cloud.sleuthtoio.micrometer.tracing