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

Implement ThreadLocalAccessor for propagating Sentry hub with reactor / WebFlux #2570

Merged
merged 10 commits into from
Mar 1, 2023

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Feb 24, 2023

📜 Description

Implement ThreadLocalAccessor for propagating Sentry hub with reactor / WebFlux

💡 Motivation and Context

To automatically have the correct thread local hub without requiring explicit user code.

💚 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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2023

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

Generated by 🚫 dangerJS against e132c76

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 328.25 ms 333.70 ms 5.45 ms
Size 1.73 MiB 2.34 MiB 626.22 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
db5bd4e 286.94 ms 315.26 ms 28.32 ms
db5bd4e 352.90 ms 359.52 ms 6.62 ms
db5bd4e 314.82 ms 349.17 ms 34.35 ms
d691d8f 352.56 ms 389.59 ms 37.03 ms
db5bd4e 347.00 ms 366.74 ms 19.74 ms

App size

Revision Plain With Sentry Diff
db5bd4e 1.73 MiB 2.34 MiB 626.30 KiB
db5bd4e 1.73 MiB 2.34 MiB 626.30 KiB
db5bd4e 1.73 MiB 2.34 MiB 626.30 KiB
d691d8f 1.73 MiB 2.34 MiB 626.23 KiB
db5bd4e 1.73 MiB 2.34 MiB 626.30 KiB

Previous results on branch: feat/support-thread-local-accessor-for-reactor

Startup times

Revision Plain With Sentry Diff
05b9e20 343.67 ms 366.00 ms 22.33 ms
b3f3d7a 336.37 ms 387.04 ms 50.67 ms
14b93a6 305.29 ms 334.71 ms 29.43 ms
faa16e4 329.80 ms 384.18 ms 54.38 ms
7620651 325.24 ms 359.59 ms 34.35 ms

App size

Revision Plain With Sentry Diff
05b9e20 1.73 MiB 2.34 MiB 626.30 KiB
b3f3d7a 1.73 MiB 2.34 MiB 626.30 KiB
14b93a6 1.73 MiB 2.34 MiB 626.30 KiB
faa16e4 1.73 MiB 2.34 MiB 626.22 KiB
7620651 1.73 MiB 2.34 MiB 626.30 KiB

@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Patch coverage: 76.11% and project coverage change: -0.03 ⚠️

Comparison is base (d691d8f) 80.42% compared to head (ea3be7d) 80.40%.

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

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2570      +/-   ##
============================================
- Coverage     80.42%   80.40%   -0.03%     
- Complexity     4006     4017      +11     
============================================
  Files           329      332       +3     
  Lines         15111    15160      +49     
  Branches       1978     1979       +1     
============================================
+ Hits          12153    12189      +36     
- Misses         2179     2191      +12     
- Partials        779      780       +1     
Impacted Files Coverage Δ
...ebflux/SentryWebFilterWithThreadLocalAccessor.java 0.00% <0.00%> (ø)
sentry/src/main/java/io/sentry/Sentry.java 55.20% <0.00%> (-0.88%) ⬇️
...io/sentry/spring/jakarta/webflux/ReactorUtils.java 61.53% <61.53%> (ø)
...g/boot/jakarta/SentryWebfluxAutoConfiguration.java 85.71% <83.33%> (+19.04%) ⬆️
...o/sentry/spring/boot/jakarta/SentryProperties.java 77.77% <88.88%> (+3.70%) ⬆️
...ing/jakarta/webflux/SentryWebExceptionHandler.java 90.90% <89.47%> (-3.21%) ⬇️
...arta/webflux/SentryReactorThreadLocalAccessor.java 100.00% <100.00%> (ø)
...sentry/spring/jakarta/webflux/SentryWebFilter.java 95.45% <100.00%> (+0.21%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

Base automatically changed from feat/add-webflux-jakarta-sample to main February 27, 2023 04:23
@adinauer adinauer marked this pull request as ready for review March 1, 2023 05:05
@adinauer adinauer merged commit e5bbb00 into main Mar 1, 2023
@adinauer adinauer deleted the feat/support-thread-local-accessor-for-reactor branch March 1, 2023 10:54
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.

2 participants