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

Use daemon threads for SentryExecutorService #2747

Merged
merged 4 commits into from
May 30, 2023

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented May 30, 2023

📜 Description

We're now passing a ThreadFactory that sets daemon to true so threads will no longer block shutdown.

💡 Motivation and Context

Fixes #2744

💚 How did you test it?

Manually using Logback sample.

📝 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

@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 329.15 ms 382.67 ms 53.53 ms
Size 1.72 MiB 2.28 MiB 571.60 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
16cd2b6 243.02 ms 349.69 ms 106.67 ms
46b1782 387.72 ms 458.74 ms 71.02 ms
1707044 338.80 ms 384.79 ms 46.00 ms

App size

Revision Plain With Sentry Diff
16cd2b6 1.72 MiB 2.28 MiB 570.95 KiB
46b1782 1.72 MiB 2.28 MiB 570.44 KiB
1707044 1.72 MiB 2.28 MiB 570.44 KiB

Previous results on branch: fix/use-daemon-threads-for-sentry-executor-service

Startup times

Revision Plain With Sentry Diff
24917e3 313.12 ms 345.75 ms 32.63 ms
60431b9 294.82 ms 338.18 ms 43.36 ms

App size

Revision Plain With Sentry Diff
24917e3 1.72 MiB 2.28 MiB 571.10 KiB
60431b9 1.72 MiB 2.28 MiB 571.10 KiB

@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (9dddfbf) 81.09% compared to head (f8de238) 81.10%.

❗ Current head f8de238 differs from pull request most recent head 8d2da23. Consider uploading reports for the commit 8d2da23 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2747      +/-   ##
============================================
+ Coverage     81.09%   81.10%   +0.01%     
+ Complexity     4470     4455      -15     
============================================
  Files           347      344       -3     
  Lines         16472    16423      -49     
  Branches       2232     2227       -5     
============================================
- Hits          13358    13320      -38     
+ Misses         2181     2174       -7     
+ Partials        933      929       -4     
Impacted Files Coverage Δ
...src/main/java/io/sentry/SentryExecutorService.java 95.83% <100.00%> (+0.59%) ⬆️

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@adinauer adinauer enabled auto-merge (squash) May 30, 2023 11:25
@adinauer adinauer merged commit d528048 into main May 30, 2023
@adinauer adinauer deleted the fix/use-daemon-threads-for-sentry-executor-service branch May 30, 2023 11:33
@adinauer adinauer mentioned this pull request Jan 30, 2024
7 tasks
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.

Main application hangs if it initializes a KafkaProducer with sentry-java 6.19.1
2 participants