Skip to content

Conversation

noahsmartin
Copy link
Contributor

@noahsmartin noahsmartin commented Oct 4, 2025

Removes V9 checks for deprecated segment property and deprecated TraceContext initializers

#skip-changelog

Closes #6349

Copy link

codecov bot commented Oct 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.710%. Comparing base (c3d6cfa) to head (9ff9f90).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #6348       +/-   ##
=============================================
- Coverage   86.767%   86.710%   -0.058%     
=============================================
  Files          438       438               
  Lines        37311     37201      -110     
  Branches     17424     17408       -16     
=============================================
- Hits         32374     32257      -117     
- Misses        4891      4899        +8     
+ Partials        46        45        -1     
Files with missing lines Coverage Δ
Sources/Sentry/SentryBaggage.m 100.000% <ø> (ø)
Sources/Sentry/SentryClient.m 99.320% <ø> (-0.010%) ⬇️
Sources/Sentry/SentryNetworkTracker.m 96.658% <ø> (-0.078%) ⬇️
Sources/Sentry/SentryTraceContext.m 96.946% <ø> (+0.992%) ⬆️
Sources/Sentry/SentryUser.m 95.488% <ø> (-0.919%) ⬇️
...wift/Protocol/Codable/SentryDebugMetaCodable.swift 100.000% <100.000%> (ø)
...ces/Swift/Protocol/Codable/SentryUserCodable.swift 100.000% <ø> (ø)

... and 10 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 c3d6cfa...9ff9f90. Read the comment docs.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Oct 4, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1222.04 ms 1252.11 ms 30.07 ms
Size 23.75 KiB 986.67 KiB 962.92 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5196f0d 1213.35 ms 1231.37 ms 18.02 ms
be6a4ee 1226.33 ms 1249.77 ms 23.44 ms
5aa3ce5 1222.78 ms 1245.39 ms 22.61 ms
449d185 1216.31 ms 1251.94 ms 35.62 ms
8203ac0 1235.59 ms 1256.02 ms 20.43 ms
d23a1b1 1218.94 ms 1239.53 ms 20.60 ms
09471ff 1239.98 ms 1256.65 ms 16.67 ms
acac774 1217.76 ms 1253.29 ms 35.52 ms
1936411 1231.51 ms 1253.27 ms 21.76 ms
588dd7c 1235.11 ms 1241.76 ms 6.65 ms

App size

Revision Plain With Sentry Diff
5196f0d 23.75 KiB 876.93 KiB 853.19 KiB
be6a4ee 23.75 KiB 913.14 KiB 889.39 KiB
5aa3ce5 23.75 KiB 904.54 KiB 880.79 KiB
449d185 23.75 KiB 980.81 KiB 957.06 KiB
8203ac0 23.75 KiB 959.44 KiB 935.69 KiB
d23a1b1 23.75 KiB 913.64 KiB 889.88 KiB
09471ff 23.75 KiB 990.16 KiB 966.41 KiB
acac774 23.75 KiB 866.51 KiB 842.76 KiB
1936411 23.74 KiB 913.39 KiB 889.64 KiB
588dd7c 23.75 KiB 938.33 KiB 914.58 KiB

Previous results on branch: v9Decodable

Startup times

Revision Plain With Sentry Diff
887292b 1237.00 ms 1269.51 ms 32.51 ms
e55704e 1224.78 ms 1255.50 ms 30.72 ms
69ea418 1216.50 ms 1255.47 ms 38.97 ms
8142fa1 1236.86 ms 1269.24 ms 32.38 ms

App size

Revision Plain With Sentry Diff
887292b 23.75 KiB 991.17 KiB 967.43 KiB
e55704e 23.75 KiB 991.23 KiB 967.48 KiB
69ea418 23.75 KiB 991.31 KiB 967.57 KiB
8142fa1 23.75 KiB 991.24 KiB 967.50 KiB

@noahsmartin noahsmartin force-pushed the v9Decodable branch 3 times, most recently from c0e1099 to 4db48e2 Compare October 5, 2025 16:43
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

spanId:(SentrySpanId *)spanId
parentSpanId:(nullable SentrySpanId *)parentSpanId
parentSampled:(SentrySampleDecision)parentSampled
DEPRECATED_MSG_ATTRIBUTE("Use "
Copy link
Member

Choose a reason for hiding this comment

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

h: We should create a migration guide with the note what to use instead. Either an migration.md or a page in sentry-docs

@noahsmartin noahsmartin changed the title chore: Remove V9 checks for decodable and segment chore: Remove V9 checks for segment Oct 7, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Oct 8, 2025

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentryNetworkTracker.m

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Incorrect Key Usage in Serialization

In the serialize method, the "sampled" key is incorrectly set using _sampleRate instead of _sampled, which means the sampled value won't be serialized correctly.

Sources/Sentry/SentryTraceContext.m#L188-L190

if (_sampled != nil) {
[result setValue:_sampleRate forKey:@"sampled"];

Fix in Cursor Fix in Web


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.

chore: Remove V9 checks for decodable and segment

2 participants