-
-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect Spring (Boot) version and log a warning if not compatible #2914
Comments
I got bitten by this upgrading a project from Spring 2 to Spring 3 and it took a while to track down, I didn't switch to the Jakarta dependency. I was adding Then a co-worker upgraded another project a few months later and ran into exactly the same thing (I'd forgotten about this when reviewing his changes and missed it). It would be really helpful to fail at build time (not sure this is possible), but otherwise logging a big fat warning at startup time would be really useful. We rely on sentry to reporting errors to us so sadly would probably miss the logged warning once it's no longer on a developers machine. |
@buckett sorry for the inconvenience, we'll bump prio on this and check what we can do. |
Yeah, hopefully we don't miss it again, it just because often Java upgrades are caught as compile time errors it's easy to fall into the trap of upgrade dependencies and then fix/build/repeat until the application builds and the tests pass. We don't have any sentry tests (do other people?) so it's easy to miss that the sentry autoconfiguration wasn't getting picked up. For us the performance data means that we normally spot something is wrong after a short while, but if you're only using Sentry for errors on a small application it might be easy to miss this for a long time. |
Problem Statement
see solution
Solution Brainstorm
Since we offer a separate dependency for Spring 5 vs Spring 6 and Spring Boot 2 vs Spring Boot 3 we could detect the version of Spring (Boot) that's used and compare with intended version of the dependency then log a warning if incompatible.
The text was updated successfully, but these errors were encountered: