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

update coroutines to 1.6.1, use CopyableThreadContextElement #2838

Merged
merged 21 commits into from
Jul 25, 2023

Conversation

lbloder
Copy link
Collaborator

@lbloder lbloder commented Jul 12, 2023

📜 Description

Use CopyableThreadContextElement as superclass for SentryContext.

💡 Motivation and Context

Fixes #2687.
Allows for correct progagation of the SentryContext to child-coroutines.
Context propagation now behaves as described in the docs here: https://docs.sentry.io/platforms/java/guides/spring/enriching-events/scopes/#usage

💚 How did you test it?

Automated Unit Test

📝 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 Jul 12, 2023

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

Generated by 🚫 dangerJS against d56c7c2

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 276.69 ms 329.70 ms 53.01 ms
Size 1.72 MiB 2.29 MiB 575.57 KiB

Previous results on branch: feat/coroutine_context_propagation

Startup times

Revision Plain With Sentry Diff
d682eed 289.13 ms 322.75 ms 33.63 ms
43c30e9 345.22 ms 401.72 ms 56.50 ms
d2a1d03 300.27 ms 347.45 ms 47.18 ms
01793af 308.04 ms 345.98 ms 37.94 ms
d991728 306.22 ms 379.98 ms 73.76 ms
4832bff 296.70 ms 345.86 ms 49.16 ms
38dab75 307.74 ms 363.86 ms 56.12 ms
87a9528 313.35 ms 357.31 ms 43.96 ms
699fd55 291.17 ms 315.34 ms 24.17 ms
5679b98 304.72 ms 340.31 ms 35.59 ms

App size

Revision Plain With Sentry Diff
d682eed 1.72 MiB 2.29 MiB 575.24 KiB
43c30e9 1.72 MiB 2.29 MiB 575.24 KiB
d2a1d03 1.72 MiB 2.29 MiB 575.30 KiB
01793af 1.72 MiB 2.29 MiB 575.24 KiB
d991728 1.72 MiB 2.29 MiB 575.24 KiB
4832bff 1.72 MiB 2.29 MiB 575.24 KiB
38dab75 1.72 MiB 2.29 MiB 575.57 KiB
87a9528 1.72 MiB 2.29 MiB 575.24 KiB
699fd55 1.72 MiB 2.29 MiB 575.24 KiB
5679b98 1.72 MiB 2.29 MiB 575.24 KiB

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Patch coverage: 86.47% and project coverage change: +0.15% 🎉

Comparison is base (9020d1b) 81.26% compared to head (d56c7c2) 81.41%.

Additional details and impacted files
@@               Coverage Diff                @@
##             feat/7.0.0    #2838      +/-   ##
================================================
+ Coverage         81.26%   81.41%   +0.15%     
- Complexity         4560     4647      +87     
================================================
  Files               350      354       +4     
  Lines             16866    17108     +242     
  Branches           2272     2313      +41     
================================================
+ Hits              13706    13929     +223     
- Misses             2219     2230      +11     
- Partials            941      949       +8     
Files Changed Coverage Δ
...racing/SentrySpanClientHttpRequestInterceptor.java 0.00% <0.00%> (ø)
...ebflux/SentryWebFilterWithThreadLocalAccessor.java 0.00% <0.00%> (ø)
...racing/SentrySpanClientHttpRequestInterceptor.java 0.00% <0.00%> (ø)
sentry/src/main/java/io/sentry/Breadcrumb.java 85.04% <ø> (ø)
sentry/src/main/java/io/sentry/HostnameCache.java 90.69% <ø> (ø)
sentry/src/main/java/io/sentry/Hub.java 75.17% <ø> (ø)
.../src/main/java/io/sentry/JsonObjectSerializer.java 84.21% <ø> (ø)
...ry/src/main/java/io/sentry/ProfilingTraceData.java 78.51% <ø> (ø)
.../main/java/io/sentry/ProfilingTransactionData.java 52.52% <ø> (ø)
sentry/src/main/java/io/sentry/Scope.java 96.72% <0.00%> (-0.36%) ⬇️
... and 81 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lbloder lbloder changed the title update coroutines to 1.7.1, use CopyableThreadContextElement update coroutines to 1.6.1, use CopyableThreadContextElement Jul 13, 2023
@lbloder lbloder marked this pull request as ready for review July 13, 2023 15:50
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@lbloder lbloder changed the base branch from main to feat/7.0.0 July 21, 2023 07:12
@romtsn romtsn merged commit 803f03c into feat/7.0.0 Jul 25, 2023
16 of 17 checks passed
@romtsn romtsn deleted the feat/coroutine_context_propagation branch July 25, 2023 18:02
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.

Investigate CopyableThreadContextElement for kotlin coroutines
5 participants