-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
SentryCheckIn annotation and advice config for Spring #2946
SentryCheckIn annotation and advice config for Spring #2946
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- SentryCheckIn annotation and advice config for Spring ([#2946](https://github.com/getsentry/sentry-java/pull/2946)) If none of the above apply, you can opt out of this check by adding |
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5894625 | 378.40 ms | 424.38 ms | 45.98 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5894625 | 1.72 MiB | 2.29 MiB | 575.99 KiB |
Previous results on branch: feat/crons-spring-scheduled
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
c11b373 | 274.50 ms | 309.04 ms | 34.54 ms |
a59fe55 | 351.31 ms | 451.24 ms | 99.93 ms |
24b1f58 | 394.88 ms | 467.82 ms | 72.94 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
c11b373 | 1.72 MiB | 2.29 MiB | 575.99 KiB |
a59fe55 | 1.72 MiB | 2.29 MiB | 576.09 KiB |
24b1f58 | 1.72 MiB | 2.29 MiB | 575.99 KiB |
Codecov ReportAll modified lines are covered by tests ✅ 📢 Thoughts on this report? Let us know!. |
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.
Maybe we could add a test similar to the SentryTransactionAdviceTest
.
added comments regarding the scope of the annotation
sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/checkin/SentryCheckIn.java
Outdated
Show resolved
Hide resolved
sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/checkin/SentryCheckInAdvice.java
Show resolved
Hide resolved
sentry-spring/src/main/java/io/sentry/spring/checkin/SentryCheckIn.java
Outdated
Show resolved
Hide resolved
sentry-spring/src/main/java/io/sentry/spring/checkin/SentryCheckInAdvice.java
Show resolved
Hide resolved
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.
Left some wording suggestions.
Otherwise LGTM 👍
sentry-spring/src/test/kotlin/io/sentry/spring/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring/src/test/kotlin/io/sentry/spring/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring/src/test/kotlin/io/sentry/spring/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring/src/test/kotlin/io/sentry/spring/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring/src/test/kotlin/io/sentry/spring/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring-jakarta/src/test/kotlin/io/sentry/spring/jakarta/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring-jakarta/src/test/kotlin/io/sentry/spring/jakarta/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring-jakarta/src/test/kotlin/io/sentry/spring/jakarta/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring-jakarta/src/test/kotlin/io/sentry/spring/jakarta/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
sentry-spring-jakarta/src/test/kotlin/io/sentry/spring/jakarta/SentryCheckInAdviceTest.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Lukas Bloder <[email protected]>
📜 Description
The
@SentryCheckIn
annotation can be put on methods in Spring applications, sending check-ins for that method.This can for example be combined with
@Scheduled
methods.💡 Motivation and Context
Support for
@Scheduled
in Spring💚 How did you test it?
manually
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps