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

Show warning if incompatible spring boot version is detected #3233

Merged
merged 5 commits into from
Feb 29, 2024

Conversation

lbloder
Copy link
Collaborator

@lbloder lbloder commented Feb 27, 2024

📜 Description

Check for spring boot version on startup and show warning if an incompatible spring boot version is detected.

💡 Motivation and Context

Fixes #2914

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Feb 27, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 740d816

Copy link
Contributor

github-actions bot commented Feb 27, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 410.79 ms 483.94 ms 73.15 ms
Size 1.70 MiB 2.28 MiB 590.90 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8fd337b 349.16 ms 459.22 ms 110.06 ms
86f0096 381.33 ms 476.58 ms 95.25 ms
2a3dd50 363.61 ms 440.18 ms 76.57 ms
2465853 411.39 ms 461.10 ms 49.72 ms
5e04ee8 380.63 ms 501.84 ms 121.21 ms
c554ca2 364.98 ms 433.64 ms 68.66 ms
4e29063 376.38 ms 390.98 ms 14.60 ms
a3c77bc 375.80 ms 445.85 ms 70.06 ms
4e260b3 378.73 ms 454.18 ms 75.45 ms
eecfab6 399.27 ms 461.82 ms 62.55 ms

App size

Revision Plain With Sentry Diff
8fd337b 1.72 MiB 2.27 MiB 555.00 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB
2a3dd50 1.72 MiB 2.27 MiB 555.05 KiB
2465853 1.70 MiB 2.27 MiB 583.82 KiB
5e04ee8 1.70 MiB 2.27 MiB 584.64 KiB
c554ca2 1.70 MiB 2.27 MiB 582.25 KiB
4e29063 1.72 MiB 2.29 MiB 578.38 KiB
a3c77bc 1.72 MiB 2.29 MiB 577.53 KiB
4e260b3 1.72 MiB 2.27 MiB 554.95 KiB
eecfab6 1.72 MiB 2.27 MiB 558.56 KiB

Previous results on branch: feat/detect-wrong-spring-version

Startup times

Revision Plain With Sentry Diff
bfa89d7 395.13 ms 476.19 ms 81.05 ms
9e2457c 411.37 ms 492.29 ms 80.91 ms

App size

Revision Plain With Sentry Diff
bfa89d7 1.70 MiB 2.28 MiB 590.71 KiB
9e2457c 1.70 MiB 2.28 MiB 588.11 KiB

Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM. Please check if spring.factories can still be used with the latest Spring Boot 3 (prerelease)version.

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
org.springframework.context.ApplicationListener=io.sentry.spring.boot.jakarta.SentrySpringVersionChecker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h does this still work with Spring 3.3.0-M2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with 3.3.0-M2 and is working as expected. Seems like this change was only targeting auto-configuration.
Also the current documentation for 3.3.0-M2 mentions spring.factories as the place to register listeners: https://docs.spring.io/spring-boot/docs/3.3.0-M2/reference/htmlsingle/#features.spring-application.application-events-and-listeners.

@adinauer adinauer self-assigned this Feb 28, 2024
lbloder and others added 3 commits February 29, 2024 08:45
Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
@lbloder lbloder marked this pull request as ready for review February 29, 2024 20:07
@lbloder lbloder enabled auto-merge (squash) February 29, 2024 20:07
@lbloder lbloder merged commit c7addb9 into main Feb 29, 2024
31 checks passed
@lbloder lbloder deleted the feat/detect-wrong-spring-version branch February 29, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect Spring (Boot) version and log a warning if not compatible
2 participants