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

CRONS support for Quartz and Spring @Scheduled #2952

Merged
merged 8 commits into from Sep 27, 2023
Merged

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Sep 25, 2023

📜 Description

This PR collects mulitple PRs around CRONS to be merged into main together.

Adds support for Quartz by providing a SentryJobListener that picks up the monitor slug from the job data map and sends check-ins for jobs where a slug is configured.

Adds support for Spring @Scheduled tasks by annotating the task method with @SentryCheckIn to configure the monitor slug.

Also adds an option ignoredCheckIns to ignore check-ins for certain monitor slugs.

💡 Motivation and Context

Closes #2875

💚 How did you test it?

Manually, partial Test coverage

📝 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. Docs for Java SDK Check-ins sentry-docs#7963
  • 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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2023

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

Generated by 🚫 dangerJS against ac4897a

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 367.29 ms 449.43 ms 82.14 ms
Size 1.72 MiB 2.29 MiB 575.99 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
f274c79 334.86 ms 348.54 ms 13.68 ms
9e60fc1 310.37 ms 359.48 ms 49.11 ms
9e60fc1 309.74 ms 362.30 ms 52.56 ms
adf8fe3 300.49 ms 357.36 ms 56.87 ms
9e60fc1 331.71 ms 374.28 ms 42.57 ms
f60279b 324.60 ms 345.33 ms 20.73 ms
f274c79 313.96 ms 355.96 ms 42.00 ms
fe10f05 314.71 ms 360.62 ms 45.90 ms
9246ed4 281.79 ms 352.08 ms 70.29 ms
695d3a3 300.98 ms 376.90 ms 75.92 ms

App size

Revision Plain With Sentry Diff
f274c79 1.72 MiB 2.29 MiB 575.01 KiB
9e60fc1 1.72 MiB 2.29 MiB 575.91 KiB
9e60fc1 1.72 MiB 2.29 MiB 575.91 KiB
adf8fe3 1.72 MiB 2.29 MiB 575.24 KiB
9e60fc1 1.72 MiB 2.29 MiB 575.91 KiB
f60279b 1.72 MiB 2.29 MiB 575.23 KiB
f274c79 1.72 MiB 2.29 MiB 575.01 KiB
fe10f05 1.72 MiB 2.29 MiB 575.54 KiB
9246ed4 1.72 MiB 2.28 MiB 572.22 KiB
695d3a3 1.72 MiB 2.29 MiB 575.53 KiB

Previous results on branch: feat/crons-lib-support

Startup times

Revision Plain With Sentry Diff
5894625 378.40 ms 424.38 ms 45.98 ms
bc5c321 360.23 ms 438.00 ms 77.77 ms
375e92a 411.15 ms 478.15 ms 67.00 ms

App size

Revision Plain With Sentry Diff
5894625 1.72 MiB 2.29 MiB 575.99 KiB
bc5c321 1.72 MiB 2.29 MiB 575.99 KiB
375e92a 1.72 MiB 2.29 MiB 575.99 KiB

@adinauer adinauer changed the title CRONS library support CRONS support for Quartz and Spring @Scheduled Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Attention: 148 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...y/spring/boot/jakarta/SentryAutoConfiguration.java 97.26% <100.00%> (+0.11%) ⬆️
...io/sentry/spring/boot/SentryAutoConfiguration.java 97.26% <100.00%> (+0.11%) ⬆️
...arta/checkin/SentryCheckInAdviceConfiguration.java 100.00% <100.00%> (ø)
...ta/checkin/SentryCheckInPointcutConfiguration.java 100.00% <100.00%> (ø)
...ring/checkin/SentryCheckInAdviceConfiguration.java 100.00% <100.00%> (ø)
...ng/checkin/SentryCheckInPointcutConfiguration.java 100.00% <100.00%> (ø)
sentry/src/main/java/io/sentry/CheckInStatus.java 100.00% <100.00%> (ø)
...entry/src/main/java/io/sentry/ExternalOptions.java 98.20% <100.00%> (+0.04%) ⬆️
sentry/src/main/java/io/sentry/Hub.java 75.84% <100.00%> (+0.67%) ⬆️
sentry/src/main/java/io/sentry/HubAdapter.java 95.65% <100.00%> (+0.06%) ⬆️
... and 22 more

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@adinauer adinauer merged commit c1eff76 into main Sep 27, 2023
19 of 22 checks passed
@adinauer adinauer deleted the feat/crons-lib-support branch September 27, 2023 11:41
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.

Crons support for Java
2 participants