fix(spring): Support Spring Boot 4.1#5573
Conversation
Bump OpenTelemetry and Spring Boot dependencies to compatible versions so the Spring Boot 4 OpenTelemetry sample works with Spring Boot 4.1. Keep the Spring 7 sample on the repository Kotlin compiler version when importing the Spring Boot BOM, and add Spring Boot 4.1 to the system test matrix. Fixes GH-5561 Co-Authored-By: Claude <noreply@anthropic.com>
📲 Install BuildsAndroid
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 18c0bc2 | 306.73 ms | 349.77 ms | 43.03 ms |
| 0eaac1e | 316.82 ms | 357.34 ms | 40.52 ms |
| d15471f | 303.49 ms | 439.08 ms | 135.59 ms |
| fc5ccaf | 276.52 ms | 370.46 ms | 93.93 ms |
| e2dce0b | 308.96 ms | 360.10 ms | 51.14 ms |
| 5b1a06b | 352.27 ms | 413.70 ms | 61.43 ms |
| 37ec571 | 366.04 ms | 424.28 ms | 58.23 ms |
| 9fbb112 | 361.43 ms | 427.57 ms | 66.14 ms |
| bbc35bb | 324.88 ms | 425.73 ms | 100.85 ms |
| ff8eea4 | 313.42 ms | 337.08 ms | 23.66 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 18c0bc2 | 1.58 MiB | 2.13 MiB | 557.33 KiB |
| 0eaac1e | 1.58 MiB | 2.19 MiB | 619.17 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| fc5ccaf | 1.58 MiB | 2.13 MiB | 557.54 KiB |
| e2dce0b | 0 B | 0 B | 0 B |
| 5b1a06b | 0 B | 0 B | 0 B |
| 37ec571 | 0 B | 0 B | 0 B |
| 9fbb112 | 1.58 MiB | 2.11 MiB | 539.18 KiB |
| bbc35bb | 1.58 MiB | 2.12 MiB | 553.01 KiB |
| ff8eea4 | 1.58 MiB | 2.28 MiB | 718.64 KiB |
|
|
||
| ### Dependencies | ||
|
|
||
| - Bump Spring Boot 4 and OpenTelemetry dependencies ([#5573](https://github.com/getsentry/sentry-java/pull/5573)) |
There was a problem hiding this comment.
- 🚫 The changelog entry seems to be part of an already released section
## 8.44.1.
Consider moving the entry to the## Unreleasedsection, please.
runningcode
left a comment
There was a problem hiding this comment.
LGTM, just some nits
| sqliteAlpha = "2.7.0-alpha06" # Required by Room3 3.0.0-alpha* | ||
| slf4j = "1.7.30" | ||
| spotless = "8.4.0" | ||
| spotless = "8.6.0" |
There was a problem hiding this comment.
Gonna bump this in a separate PR since it also causes a ton of reformatting that'd make this PR harder to read.
|
|
||
| repositories { mavenCentral() } | ||
|
|
||
| extra["kotlin.version"] = KotlinCompilerVersion.VERSION |
There was a problem hiding this comment.
what does this do/who consumes this?
There was a problem hiding this comment.
Note sure, can we just globally bump the kotlin version instead @runningcode ?
There was a problem hiding this comment.
I won't be against bumping a kotlin version. I just don't know what this line of code does or how it is consumed.
There was a problem hiding this comment.
Should be spring boot plugin that consumes it, let me check.
There was a problem hiding this comment.
Yes, that's what's happening, we're telling Spring Boot dependency management plugin to use our kotlin version instead of what Spring Boot BOM says.
There was a problem hiding this comment.
oh interesting. i didn't know that's how the versions are read from spring boot dependency management. sounds good then! might be worth a comment.
runningcode
left a comment
There was a problem hiding this comment.
LGTM! thanks for adding
Align the global Kotlin version with Spring Boot 4.1 and remove the now-unneeded Spring 7 BOM override. Also remove unused Spring 7-specific Kotlin aliases from the version catalog. Co-Authored-By: Claude <noreply@anthropic.com>
…ix/spring-boot-4-1-otel
📜 Description
Bump Spring Boot 4 to 4.1.0 and update the related OpenTelemetry dependency set to compatible releases:
Also keep the Spring 7 sample on the repository Kotlin compiler version when importing the Spring Boot BOM, and add Spring Boot 4.1.0 to the Spring Boot 4.x system-test matrix.
💡 Motivation and Context
Spring Boot 4.1.0 pulls newer OpenTelemetry dependencies than the previous Spring Boot 4 sample setup expected. This caused the Spring Boot 4 OpenTelemetry sample to fail at runtime with incompatible OpenTelemetry versions.
Fixes #5561
💚 How did you test it?
./gradlew :sentry-samples:sentry-samples-spring-7:compileTestKotlin --rerun-tasks --no-daemon./gradlew spotlessApply apiDump --no-daemonsentry-samples-spring-boot-4sentry-samples-spring-boot-4-webfluxsentry-samples-spring-boot-4-opentelemetrywith agent auto-init enabledsentry-samples-spring-boot-4-opentelemetrywith agent auto-init disabled; first run had a transient Kafka endpoint timeout, exact rerun passedsentry-samples-spring-boot-4-opentelemetry-noagentsentry-samples-spring-boot-4-otlp📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps