-
-
Notifications
You must be signed in to change notification settings - Fork 371
ref: Convert SentryDsn to swift #6942
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6942 +/- ##
=============================================
- Coverage 85.076% 85.055% -0.021%
=============================================
Files 453 453
Lines 27674 27710 +36
Branches 12166 12173 +7
=============================================
+ Hits 23544 23569 +25
- Misses 4087 4096 +9
- Partials 43 45 +2
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
| /// Generates a SHA1 hash of the DSN URL. | ||
| /// - Returns: A hexadecimal string representation of the hash. | ||
| @objc | ||
| public func getHash() -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC this function isn't used, maybe we can delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is called from objective-c here
|
@sentry review |
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 32f2329 | 1224.36 ms | 1257.33 ms | 32.98 ms |
| df94923 | 1217.35 ms | 1247.44 ms | 30.09 ms |
| e3ebff3 | 1223.47 ms | 1249.27 ms | 25.80 ms |
| dba2de8 | 1231.45 ms | 1251.88 ms | 20.43 ms |
| ee1f2ca | 1227.47 ms | 1251.58 ms | 24.12 ms |
| fc6557e | 1226.40 ms | 1249.88 ms | 23.48 ms |
| 7cc23cf | 1203.15 ms | 1232.11 ms | 28.96 ms |
| cda95fc | 1231.42 ms | 1247.18 ms | 15.77 ms |
| 535ebd9 | 1194.59 ms | 1219.84 ms | 25.26 ms |
| 26f7b17 | 1218.47 ms | 1253.82 ms | 35.35 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 32f2329 | 23.75 KiB | 1.01 MiB | 1016.02 KiB |
| df94923 | 24.15 KiB | 1.01 MiB | 1014.90 KiB |
| e3ebff3 | 23.75 KiB | 878.48 KiB | 854.73 KiB |
| dba2de8 | 23.75 KiB | 969.25 KiB | 945.50 KiB |
| ee1f2ca | 24.15 KiB | 1.01 MiB | 1015.24 KiB |
| fc6557e | 23.75 KiB | 866.68 KiB | 842.93 KiB |
| 7cc23cf | 23.75 KiB | 913.62 KiB | 889.87 KiB |
| cda95fc | 23.75 KiB | 912.77 KiB | 889.02 KiB |
| 535ebd9 | 23.75 KiB | 1008.67 KiB | 984.92 KiB |
| 26f7b17 | 23.75 KiB | 960.93 KiB | 937.19 KiB |
Previous results on branch: antonis/ref-sentrydsn-swift
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 84f383d | 1216.06 ms | 1259.74 ms | 43.68 ms |
| 013d4db | 1201.14 ms | 1226.33 ms | 25.19 ms |
| 6d23dcf | 1212.77 ms | 1248.32 ms | 35.55 ms |
| 0db71b7 | 1225.65 ms | 1258.75 ms | 33.10 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 84f383d | 24.14 KiB | 1.02 MiB | 1020.14 KiB |
| 013d4db | 24.14 KiB | 1.02 MiB | 1017.01 KiB |
| 6d23dcf | 24.14 KiB | 1.02 MiB | 1020.13 KiB |
| 0db71b7 | 24.14 KiB | 1.02 MiB | 1020.13 KiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've run make generate-public-api with xcode 16.4
philprime
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost LGTM
🚨 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:
|
|
@philipphofmann @itaybre I had a quick discussion on this with @antonis and @noahsmartin in person and we believe this is a breaking change because everyone importing Do you agree with this approach? |
| @_implementationOnly import _SentryPrivate | ||
| import Foundation | ||
|
|
||
| import CommonCrypto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to replace this with CryptoKit and use Insecure.SHA1.hash(data:) rather than the C functions that aren't very Swift friendly. But not a blocker for this PR, we can follow up with that later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good 👍 I've actually tested it out earlier (related discussion).
I'll follow up with a separate PR on this.
📜 Description
Converts SentryDsn to swift
💡 Motivation and Context
See getsentry/sentry-react-native#5273 (comment)
💚 How did you test it?
Ci checks, Sample apps
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.