-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
Support Spring 6 and Spring Boot 3 #2289
Conversation
…utoConfiguration.imports for autoconfig
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b0b8572 | 350.30 ms | 354.92 ms | 4.62 ms |
7902403 | 343.80 ms | 389.35 ms | 45.55 ms |
6629cd8 | 318.63 ms | 350.76 ms | 32.13 ms |
b9eab61 | 308.98 ms | 339.26 ms | 30.28 ms |
84c97c5 | 284.34 ms | 317.28 ms | 32.94 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b0b8572 | 1.73 MiB | 2.29 MiB | 579.57 KiB |
7902403 | 1.73 MiB | 2.29 MiB | 579.57 KiB |
6629cd8 | 1.73 MiB | 2.29 MiB | 579.57 KiB |
b9eab61 | 1.73 MiB | 2.29 MiB | 579.88 KiB |
84c97c5 | 1.73 MiB | 2.29 MiB | 579.88 KiB |
@@ -0,0 +1,19 @@ | |||
# Sentry Sample Spring Boot | |||
|
|||
Sample application showing how to use Sentry with [Spring boot](http://spring.io/projects/spring-boot). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should mention that it's Spring boot Jakarta or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check how exactly the duplication stuff works here. Can add if easily possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it's on the samples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -0,0 +1,19 @@ | |||
# Sentry Sample Spring | |||
|
|||
Sample application showing how to use Sentry with [Spring](http://spring.io/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also Jakarta is missing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. Will check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
} | ||
} | ||
|
||
task("jakartaTransformation", JavaExec::class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this transform in the samples actually? Can't we just manually have samples with the correct package name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, I don't see that this task depends on anything, so we'd need to manually run it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it was a one time command to initially clone the samples. Not sure if we need it again in case we change a lot of stuff. @lbloder do you think we should keep this in case we need to clone again?
I think I need a better understanding of how this supposed to work to properly review it. What's the supposed workflow for this? If we change something in the Do we really need to have all those classes under source control, since they are synthetic? Can't we just have symlinks or something and generate them on the fly (e.g. only when running CI checks + when publishing)? |
If we don't have it checked in, how do we add the dependency on it for the sample? We'd need to publish it somewhere, no? |
Started an internal discussion whether it makes sense to move forward with this approach based on Eclipse Transformer. It feels like a lot of complexity just to save us from maintaining a few more files. That said, I'd like this to be released as an initial |
@@ -27,7 +27,7 @@ jobs: | |||
uses: actions/setup-java@v2 | |||
with: | |||
java-version: ${{ matrix.java }} | |||
distribution: 'adopt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to change the distribution
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good move since they have rebranded and recommend people move from Adopt to Termurin.
See - https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/
@@ -1,5 +1,5 @@ | |||
# Daemon’s heap size | |||
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC | |||
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, MaxPermSize
was helping with Android builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been removed in Java 17, see https://stackoverflow.com/questions/69402824/java-17-with-maven-wrapper-results-in-unrecognized-vm-option-maxpermsize-512m
Is there a specific commit hash we should look into? 300 files are hard to review, and GH does not render correctly. |
No. The most important changes are probably the build files for the new modules. I guess it's easier to check out the branch and view them in the IDE. After this has been released my preference would be to rework them, remove the automated transformation code and just have two sets of gradle modules for each of the spring modules. |
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Support Spring 6 and Spring Boot 3 ([#2289](https://github.com/getsentry/sentry-java/pull/2289)) If none of the above apply, you can opt out of this check by adding |
📜 Description
Support jakarta which is required for Spring 6 and Spring Boot 3.
Also need to bump environment to Java 17 for building.
💡 Motivation and Context
Newer versions of Spring (Boot) use
jakarta
imports instead ofjavax
imports that were used in older versions.💚 How did you test it?
Samples
📝 Checklist
🔮 Next steps
@Ignore
), they should be reactivated0.6