sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

ref: Convert SentryNSURLRequest to Swift

Open noahsmartin opened this issue 6 months ago • 2 comments

:scroll: Description

Converts SentryNSURLRequest to Swift

:green_heart: How did you test it?

Build + existing tests

:pencil: Checklist

You have to check all boxes before merging:

  • [X] I added tests to verify the changes.
  • [X] No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • [X] I updated the docs if needed.
  • [X] I updated the wizard if needed.
  • [X] Review from the native team if needed.
  • [X] No breaking change or entry added to the changelog.
  • [X] No breaking change for hybrid SDKs or communicated to hybrid SDKs.

noahsmartin avatar Jun 21 '25 15:06 noahsmartin

Codecov Report

Attention: Patch coverage is 95.65217% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.207%. Comparing base (95cfd20) to head (8e2453b). Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Swift/Tools/SentryURLRequestFactory.swift 95.454% 2 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5457       +/-   ##
=============================================
- Coverage   86.221%   86.207%   -0.015%     
=============================================
  Files          399       399               
  Lines        34647     34648        +1     
  Branches     14983     14991        +8     
=============================================
- Hits         29873     29869        -4     
- Misses        4726      4736       +10     
+ Partials        48        43        -5     
Files with missing lines Coverage Δ
Sources/Sentry/SentryHttpTransport.m 98.161% <ø> (ø)
Sources/Sentry/SentryNSDataUtils.m 97.619% <ø> (ø)
Sources/Sentry/SentryNSURLRequestBuilder.m 100.000% <100.000%> (ø)
Sources/Sentry/SentrySpotlightTransport.m 79.310% <ø> (ø)
Sources/Swift/Tools/SentryURLRequestFactory.swift 95.454% <95.454%> (ø)

... and 5 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 95cfd20...8e2453b. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 21 '25 16:06 codecov[bot]

Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1226.60 ms 1249.67 ms 23.07 ms
Size 23.75 KiB 849.23 KiB 825.48 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
9faf2175dbc03d57307202d15fea3b0581fb47aa 1268.86 ms 1274.82 ms 5.96 ms
b5bcbab6ba2deba5b1e3aa2d76b0491be34e7981 1222.24 ms 1243.20 ms 20.96 ms
b1b7d72a698a580149d8d0c91218f3ff532d79f7 1246.31 ms 1261.00 ms 14.69 ms
83acf3e57a9b03bdde1f89988946d38cfbf79495 1240.06 ms 1261.38 ms 21.31 ms
8ef07fb048bd862c61aecee28e7b0e80c33ca926 1231.45 ms 1243.98 ms 12.53 ms
a9103fe09dcaa2f8b814062b46a8b6f59692df55 1221.49 ms 1243.33 ms 21.84 ms
7f691b5344ddcfd55da954cc56722e2109751f03 1233.94 ms 1243.80 ms 9.86 ms
81c218773ab43837a3f510e34f426197b60c748d 1224.20 ms 1252.68 ms 28.48 ms
676e429128a264d3ac61c2e90e26149580495fec 1225.76 ms 1235.49 ms 9.73 ms
7054676e7fd4843e8b924d48e8b59173e8476efe 1229.46 ms 1246.40 ms 16.94 ms

App size

Revision Plain With Sentry Diff
9faf2175dbc03d57307202d15fea3b0581fb47aa 20.76 KiB 419.70 KiB 398.94 KiB
b5bcbab6ba2deba5b1e3aa2d76b0491be34e7981 23.75 KiB 846.99 KiB 823.24 KiB
b1b7d72a698a580149d8d0c91218f3ff532d79f7 20.76 KiB 436.33 KiB 415.57 KiB
83acf3e57a9b03bdde1f89988946d38cfbf79495 21.58 KiB 539.87 KiB 518.29 KiB
8ef07fb048bd862c61aecee28e7b0e80c33ca926 21.58 KiB 707.42 KiB 685.84 KiB
a9103fe09dcaa2f8b814062b46a8b6f59692df55 20.76 KiB 426.95 KiB 406.19 KiB
7f691b5344ddcfd55da954cc56722e2109751f03 20.76 KiB 420.55 KiB 399.79 KiB
81c218773ab43837a3f510e34f426197b60c748d 21.58 KiB 736.53 KiB 714.94 KiB
676e429128a264d3ac61c2e90e26149580495fec 21.58 KiB 614.73 KiB 593.15 KiB
7054676e7fd4843e8b924d48e8b59173e8476efe 21.58 KiB 542.28 KiB 520.70 KiB

Previous results on branch: convertSentryUrlRequest

Startup times

Revision Plain With Sentry Diff
dc1f35db6502916b57d08e80f51ecb54a1a6b2aa 1225.94 ms 1242.09 ms 16.15 ms

App size

Revision Plain With Sentry Diff
dc1f35db6502916b57d08e80f51ecb54a1a6b2aa 23.75 KiB 849.20 KiB 825.46 KiB

github-actions[bot] avatar Jun 21 '25 16:06 github-actions[bot]