Skip to content
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

Closed
adinauer opened this issue Sep 5, 2023 · 3 comments · Fixed by #3233
Closed

Detect Spring (Boot) version and log a warning if not compatible #2914

adinauer opened this issue Sep 5, 2023 · 3 comments · Fixed by #3233
Assignees

Comments

@adinauer
Copy link
Member

adinauer commented Sep 5, 2023

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.

@buckett
Copy link
Contributor

buckett commented Feb 16, 2024

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 sentry.debug=true to try and work out what was wrong but it wasn't changing anything.

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.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 16, 2024
@adinauer
Copy link
Member Author

@buckett sorry for the inconvenience, we'll bump prio on this and check what we can do.

@buckett
Copy link
Contributor

buckett commented Feb 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants