-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
ref: Use SentryTracerConfiguration to initialize SentryTracer #2821
Conversation
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
005bb4c | 1237.38 ms | 1255.54 ms | 18.16 ms |
8f397a7 | 1236.76 ms | 1256.76 ms | 20.00 ms |
d80d410 | 1231.50 ms | 1240.14 ms | 8.64 ms |
3f1be0f | 1208.12 ms | 1225.72 ms | 17.60 ms |
f576153 | 1210.02 ms | 1228.94 ms | 18.92 ms |
b6ba04e | 1217.45 ms | 1248.92 ms | 31.47 ms |
eaa1002 | 1205.50 ms | 1235.08 ms | 29.58 ms |
e79ead7 | 1216.91 ms | 1247.06 ms | 30.15 ms |
e5ac362 | 1204.12 ms | 1229.41 ms | 25.29 ms |
c6504da | 1232.06 ms | 1243.28 ms | 11.22 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
005bb4c | 20.76 KiB | 419.70 KiB | 398.94 KiB |
8f397a7 | 20.76 KiB | 420.55 KiB | 399.79 KiB |
d80d410 | 20.76 KiB | 425.71 KiB | 404.95 KiB |
3f1be0f | 20.76 KiB | 414.44 KiB | 393.69 KiB |
f576153 | 20.76 KiB | 425.77 KiB | 405.01 KiB |
b6ba04e | 20.76 KiB | 414.45 KiB | 393.69 KiB |
eaa1002 | 20.76 KiB | 423.19 KiB | 402.43 KiB |
e79ead7 | 20.76 KiB | 426.11 KiB | 405.35 KiB |
e5ac362 | 20.76 KiB | 426.11 KiB | 405.34 KiB |
c6504da | 20.76 KiB | 414.44 KiB | 393.69 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 like the idea of using a builder pattern for the initialization of the tracer, as it's getting more and more complex. In languages like Swift, Java, C# the builder pattern would make sense, but for Objective-C, this doesn't work like that. I like the approach in this article. Instead of the SentryTracerConfiguration
, we could use a normal Objective-C class, which you then pass to the tracer on init. I wouldn't copy every parameter as the downside is that when adding a new parameter you need to change it in two locations. The advantage of an Objective-C class is that we can have default values for parameters, and create a constructor with the required parameters.
I would do this refactoring in an extra PR to merge it quickly and not in the INP PR.
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 like the direction. It's definitely an improvement.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2821 +/- ##
==========================================
+ Coverage 81.37% 81.43% +0.06%
==========================================
Files 259 261 +2
Lines 24356 24343 -13
Branches 10688 10810 +122
==========================================
+ Hits 19819 19824 +5
+ Misses 4032 4015 -17
+ Partials 505 504 -1
... and 11 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Thanks for this refactoring 👍. LGTM
Instead of having multiple functions to initialize SentryTracer with different configurations we should we one complex object that contains all the configurations.
#skip-changelog