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

fix: Don't override sentry-trace and baggage headers #3540

Merged
merged 6 commits into from
Jan 5, 2024

Conversation

brustolin
Copy link
Contributor

📜 Description

Don't override sentry-trace and baggage headers in a http request.
Cross platform SDKs may set this headers and we're overriding it.

💡 Motivation and Context

Close #3490

💚 How did you test it?

Unit test

📝 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

Copy link

github-actions bot commented Jan 4, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1212.18 ms 1225.35 ms 13.17 ms
Size 21.58 KiB 418.86 KiB 397.28 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a6ac3d2 1219.00 ms 1231.32 ms 12.32 ms
60dd0f5 1238.98 ms 1254.48 ms 15.50 ms
e89dc54 1220.57 ms 1233.45 ms 12.88 ms
d9fff0f 1205.09 ms 1247.40 ms 42.31 ms
734d507 1201.78 ms 1213.96 ms 12.18 ms
98cca71 1230.43 ms 1252.36 ms 21.93 ms
cd39d58 1203.87 ms 1239.88 ms 36.01 ms
c6773e5 1222.48 ms 1240.02 ms 17.54 ms
c319795 1205.12 ms 1231.20 ms 26.08 ms
75ef4eb 1237.30 ms 1249.53 ms 12.23 ms

App size

Revision Plain With Sentry Diff
a6ac3d2 20.76 KiB 436.65 KiB 415.89 KiB
60dd0f5 20.76 KiB 393.37 KiB 372.61 KiB
e89dc54 22.85 KiB 412.60 KiB 389.75 KiB
d9fff0f 22.85 KiB 401.65 KiB 378.81 KiB
734d507 22.85 KiB 412.66 KiB 389.81 KiB
98cca71 22.85 KiB 411.14 KiB 388.29 KiB
cd39d58 20.76 KiB 435.26 KiB 414.50 KiB
c6773e5 20.76 KiB 435.25 KiB 414.49 KiB
c319795 20.76 KiB 431.99 KiB 411.22 KiB
75ef4eb 22.85 KiB 413.45 KiB 390.60 KiB

Previous results on branch: fix/trace-header

Startup times

Revision Plain With Sentry Diff
28a6968 1204.69 ms 1220.02 ms 15.33 ms
6f034a1 1227.18 ms 1241.96 ms 14.77 ms
8cd0d31 1201.35 ms 1217.61 ms 16.27 ms

App size

Revision Plain With Sentry Diff
28a6968 21.58 KiB 418.86 KiB 397.28 KiB
6f034a1 21.58 KiB 418.86 KiB 397.28 KiB
8cd0d31 21.58 KiB 418.86 KiB 397.28 KiB

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

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

Comparison is base (f74904f) 89.213% compared to head (ab58b0c) 89.254%.
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3540       +/-   ##
=============================================
+ Coverage   89.213%   89.254%   +0.040%     
=============================================
  Files          528       528               
  Lines        57620     57706       +86     
  Branches     20637     20678       +41     
=============================================
+ Hits         51405     51505      +100     
- Misses        5185      5287      +102     
+ Partials      1030       914      -116     
Files Coverage Δ
Sources/Sentry/SentryBaggage.m 100.000% <ø> (ø)
...Network/SentryNetworkTrackerIntegrationTests.swift 87.218% <100.000%> (ø)
...s/SentryTests/Transaction/SentryBaggageTests.swift 100.000% <100.000%> (ø)
...erformance/Network/SentryNetworkTrackerTests.swift 97.156% <93.103%> (-0.181%) ⬇️
Sources/Sentry/SentryNetworkTracker.m 92.090% <72.727%> (-0.482%) ⬇️

... and 53 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 f74904f...ab58b0c. Read the comment docs.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM.

@brustolin brustolin merged commit 253f628 into main Jan 5, 2024
69 of 70 checks passed
@brustolin brustolin deleted the fix/trace-header branch January 5, 2024 10:29
philipphofmann pushed a commit that referenced this pull request Jan 10, 2024
Don't override sentry-trace and baggage headers in a http request.
Cross platform SDKs may set this headers and we're overriding it.
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.

Don't override trace header
3 participants