Skip to content

Conversation

noahsmartin
Copy link
Contributor

@noahsmartin noahsmartin commented Jun 21, 2025

Converts SentryEnvelopeHeader to Swift

#skip-changelog

Copy link

codecov bot commented Jun 21, 2025

Codecov Report

❌ Patch coverage is 92.68293% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.756%. Comparing base (93c76b0) to head (7f1c719).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
Sources/Sentry/SentryEnvelope.m 80.000% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5454       +/-   ##
=============================================
+ Coverage   86.625%   86.756%   +0.130%     
=============================================
  Files          427       428        +1     
  Lines        36870     36901       +31     
  Branches     15807     17419     +1612     
=============================================
+ Hits         31939     32014       +75     
+ Misses        4891      4842       -49     
- Partials        40        45        +5     
Files with missing lines Coverage Δ
Sources/Sentry/SentryClient.m 98.944% <100.000%> (+0.004%) ⬆️
Sources/Sentry/SentryTransportAdapter.m 100.000% <100.000%> (ø)
Sources/Swift/Tools/SentryEnvelopeHeader.swift 100.000% <100.000%> (ø)
Sources/Sentry/SentryEnvelope.m 87.037% <80.000%> (-1.803%) ⬇️

... and 22 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 93c76b0...7f1c719. Read the comment docs.

@noahsmartin noahsmartin changed the title ref: SentryEnvelopeHeader to swift [WIP] ref: SentryEnvelopeHeader to swift Jun 21, 2025
Copy link
Contributor

github-actions bot commented Jun 21, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1217.00 ms 1235.96 ms 18.96 ms
Size 23.75 KiB 947.71 KiB 923.96 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
effeafa 1225.88 ms 1249.78 ms 23.90 ms
2137530 1223.39 ms 1253.25 ms 29.86 ms
5d238d3 1228.94 ms 1253.04 ms 24.10 ms
efa740d 1220.71 ms 1246.20 ms 25.50 ms
d157d83 1228.02 ms 1252.47 ms 24.45 ms
5db87fa 1218.88 ms 1251.53 ms 32.65 ms
139db8b 1231.50 ms 1258.19 ms 26.69 ms
83bb978 1238.33 ms 1260.04 ms 21.71 ms
891fd1d 1220.02 ms 1227.60 ms 7.57 ms
2de3f92 1207.56 ms 1234.96 ms 27.40 ms

App size

Revision Plain With Sentry Diff
effeafa 23.74 KiB 926.64 KiB 902.89 KiB
2137530 23.75 KiB 933.33 KiB 909.58 KiB
5d238d3 23.75 KiB 913.62 KiB 889.88 KiB
efa740d 23.75 KiB 919.69 KiB 895.95 KiB
d157d83 23.75 KiB 928.85 KiB 905.10 KiB
5db87fa 23.75 KiB 926.65 KiB 902.90 KiB
139db8b 23.75 KiB 920.64 KiB 896.89 KiB
83bb978 23.75 KiB 920.64 KiB 896.89 KiB
891fd1d 23.75 KiB 919.92 KiB 896.17 KiB
2de3f92 23.75 KiB 919.69 KiB 895.94 KiB

Previous results on branch: envelopeHeaderSwift

Startup times

Revision Plain With Sentry Diff
1532434 1231.52 ms 1259.47 ms 27.95 ms
fdf2ea8 1218.63 ms 1251.82 ms 33.18 ms
cbea941 1237.08 ms 1259.14 ms 22.06 ms

App size

Revision Plain With Sentry Diff
1532434 23.75 KiB 947.72 KiB 923.97 KiB
fdf2ea8 23.75 KiB 858.40 KiB 834.64 KiB
cbea941 23.75 KiB 947.72 KiB 923.97 KiB

@noahsmartin noahsmartin force-pushed the envelopeHeaderSwift branch from 81f011c to 3b3560f Compare June 21, 2025 13:12
@noahsmartin noahsmartin changed the base branch from main to sentrySdkPackageSwift June 21, 2025 13:13
@noahsmartin noahsmartin force-pushed the sentrySdkPackageSwift branch from d0f9518 to c85b627 Compare June 21, 2025 15:56
@noahsmartin noahsmartin marked this pull request as draft June 23, 2025 12:45
Base automatically changed from sentrySdkPackageSwift to sentryExtraPackagesSwift June 23, 2025 18:29
@noahsmartin noahsmartin force-pushed the sentryExtraPackagesSwift branch 4 times, most recently from 1b0eb72 to 82ec5ad Compare June 24, 2025 19:22
Base automatically changed from sentryExtraPackagesSwift to main June 24, 2025 22:04
@noahsmartin noahsmartin force-pushed the envelopeHeaderSwift branch from 3b3560f to 32b9522 Compare June 24, 2025 23:19
Copy link
Contributor

🚨 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/SentrySerialization.m

@noahsmartin noahsmartin marked this pull request as ready for review June 24, 2025 23:20
@noahsmartin noahsmartin changed the title [WIP] ref: SentryEnvelopeHeader to swift ref: SentryEnvelopeHeader to swift Jun 24, 2025
@noahsmartin noahsmartin marked this pull request as draft June 25, 2025 01:51
@noahsmartin noahsmartin marked this pull request as ready for review September 3, 2025 20:58
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

init(id eventId: SentryId?, sdkInfo: SentrySdkInfo?, traceContext: TraceContext?) {
self.eventId = eventId
self.sdkInfo = sdkInfo
self.traceContext = traceContext
Copy link
Contributor

Choose a reason for hiding this comment

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

No super.init here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's implicit in swift

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

2 participants