-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
refactor: Convert constants SentryTraceOrigins to Swift #4717
base: main
Are you sure you want to change the base?
Conversation
🚨 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:
|
🚨 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:
|
🚨 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:
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
716a5b0 | 1240.21 ms | 1265.81 ms | 25.60 ms |
26d116c | 1196.14 ms | 1209.51 ms | 13.37 ms |
9e96fd6 | 1207.20 ms | 1229.40 ms | 22.20 ms |
75ef4eb | 1237.30 ms | 1249.53 ms | 12.23 ms |
2a769ba | 1217.92 ms | 1239.78 ms | 21.86 ms |
52e4912 | 1216.25 ms | 1226.69 ms | 10.44 ms |
8919322 | 1231.83 ms | 1255.24 ms | 23.41 ms |
99fe600 | 1226.16 ms | 1236.88 ms | 10.71 ms |
2ccbd03 | 1225.13 ms | 1247.51 ms | 22.39 ms |
f74904f | 1229.02 ms | 1244.91 ms | 15.89 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
716a5b0 | 22.31 KiB | 756.95 KiB | 734.64 KiB |
26d116c | 21.58 KiB | 417.87 KiB | 396.29 KiB |
9e96fd6 | 20.76 KiB | 425.80 KiB | 405.04 KiB |
75ef4eb | 22.85 KiB | 413.45 KiB | 390.60 KiB |
2a769ba | 21.58 KiB | 683.64 KiB | 662.05 KiB |
52e4912 | 21.58 KiB | 418.14 KiB | 396.56 KiB |
8919322 | 22.84 KiB | 403.18 KiB | 380.34 KiB |
99fe600 | 21.90 KiB | 708.13 KiB | 686.23 KiB |
2ccbd03 | 21.58 KiB | 546.20 KiB | 524.62 KiB |
f74904f | 21.58 KiB | 418.71 KiB | 397.12 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.
Also nice 👍🏻 Looks like this one will need a few fixes for tests, tho
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 would like to keep the constants internal, please.
import Foundation | ||
|
||
@objcMembers | ||
public class SentryTraceOrigin: NSObject { |
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.
h
: Again I would like to keep this internal, same as here: #4718 (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.
We'll discuss in comment
📜 Description
Moves the global constants defined in
SentryTraceOrigins.h
to static constants in a Swift class💡 Motivation and Context
@objcMembers
class to make the static properties accessible from Objective-C.enum
which is not available in Objective-C. Eventually it will only be used from Swift files, and can be replaced with an enum without further code changes.💚 How did you test it?
Unit tests
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps