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

Expose span baggage API #4207

Merged
merged 28 commits into from
Aug 16, 2024
Merged

Expose span baggage API #4207

merged 28 commits into from
Aug 16, 2024

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Jul 30, 2024

📜 Description

  • Expose SentrySpanContext and SentryBaggage classes
  • Add baggageHttpHeader and traceContext on SentrySpan protocol

💡 Motivation and Context

Closes #3519

📝 Checklist

You have to check all boxes before merging:

  • 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

Exposing traceContext in SentrySpanProtocol makes it optional, also for SentryTracer implementations. Could this be an issue?

Copy link

github-actions bot commented Jul 30, 2024

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

Generated by 🚫 dangerJS against fe1cd3e

@denrase denrase marked this pull request as ready for review July 30, 2024 13:41
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.607%. Comparing base (df2835d) to head (fe1cd3e).
Report is 5 commits behind head on main.

Files Patch % Lines
Sources/Sentry/SentrySpan.m 50.000% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4207       +/-   ##
=============================================
+ Coverage   91.601%   91.607%   +0.006%     
=============================================
  Files          617       617               
  Lines        50045     50059       +14     
  Branches     18096     18106       +10     
=============================================
+ Hits         45842     45858       +16     
+ Misses        4110      4108        -2     
  Partials        93        93               
Files Coverage Δ
SentryTestUtils/TestTransportAdapter.swift 69.230% <100.000%> (ø)
Sources/Sentry/SentryTracer.m 96.736% <100.000%> (+0.015%) ⬆️
.../SentryTests/Helper/SentrySerializationTests.swift 98.461% <100.000%> (ø)
...Network/SentryNetworkTrackerIntegrationTests.swift 69.354% <100.000%> (ø)
...erformance/Network/SentryNetworkTrackerTests.swift 98.452% <100.000%> (ø)
...sts/SentryTests/Protocol/SentryEnvelopeTests.swift 95.528% <100.000%> (ø)
Tests/SentryTests/SentryClientTests.swift 97.566% <100.000%> (ø)
Tests/SentryTests/SentrySDKTests.swift 96.762% <100.000%> (ø)
...s/SentryTests/Transaction/SentryBaggageTests.swift 100.000% <100.000%> (ø)
...ests/SentryTests/Transaction/SentrySpanTests.swift 100.000% <100.000%> (ø)
... and 2 more

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df2835d...fe1cd3e. Read the comment docs.

Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sources/Sentry/SentrySpan.m Outdated Show resolved Hide resolved
@philipphofmann
Copy link
Member

@denrase and @brustolin, what's stopping us from merging this?

@denrase
Copy link
Collaborator Author

denrase commented Aug 13, 2024

@philipphofmann Need to take another look if the failing CI is just flaky again or if it has to do with this PR.

@philipphofmann
Copy link
Member

@philipphofmann Need to take another look if the failing CI is just flaky again or if it has to do with this PR.

@denrase, please merge main back into this branch. I fixed many flaky tests last week. That could fix your problems.

Copy link

github-actions bot commented Aug 14, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1213.23 ms 1230.83 ms 17.60 ms
Size 21.58 KiB 706.17 KiB 684.59 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ae1fe61 1231.81 ms 1252.76 ms 20.95 ms
32ac934 1238.86 ms 1243.37 ms 4.52 ms
98a8c16 1234.69 ms 1265.02 ms 30.33 ms
5f8ee7a 1253.96 ms 1264.98 ms 11.02 ms
01a28a9 1225.55 ms 1249.96 ms 24.41 ms
31208ed 1217.45 ms 1246.69 ms 29.24 ms
2719ce6 1211.75 ms 1237.16 ms 25.41 ms
297f460 1234.81 ms 1255.27 ms 20.45 ms
881a955 1230.98 ms 1246.22 ms 15.24 ms
84fb4d9 1237.76 ms 1255.46 ms 17.70 ms

App size

Revision Plain With Sentry Diff
ae1fe61 21.58 KiB 698.91 KiB 677.33 KiB
32ac934 21.58 KiB 616.72 KiB 595.14 KiB
98a8c16 20.76 KiB 431.00 KiB 410.24 KiB
5f8ee7a 22.85 KiB 411.93 KiB 389.08 KiB
01a28a9 22.85 KiB 405.39 KiB 382.55 KiB
31208ed 20.76 KiB 435.26 KiB 414.50 KiB
2719ce6 20.76 KiB 435.13 KiB 414.37 KiB
297f460 21.58 KiB 629.83 KiB 608.24 KiB
881a955 22.85 KiB 407.63 KiB 384.79 KiB
84fb4d9 22.84 KiB 402.57 KiB 379.72 KiB

Previous results on branch: feat/expose-span-baggage

Startup times

Revision Plain With Sentry Diff
dd1b7f2 1229.31 ms 1246.08 ms 16.78 ms

App size

Revision Plain With Sentry Diff
dd1b7f2 21.58 KiB 706.17 KiB 684.59 KiB

@denrase
Copy link
Collaborator Author

denrase commented Aug 14, 2024

@philipphofmann The files were not properly prepared to be public, everything should be fixed now and we can merge.

@denrase denrase merged commit b3fd863 into main Aug 16, 2024
65 checks passed
@denrase denrase deleted the feat/expose-span-baggage branch August 16, 2024 07:44
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.

Expose Span baggage API
4 participants