-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
fix: CoreData tracking entity name retrieval #2329
Conversation
for (id item in entities) { | ||
NSString *cl = NSStringFromClass([item class]); | ||
for (NSManagedObject *item in entities) { | ||
NSString *cl = item.entity.name; |
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.
This is an actual functional change that I think was a bug.
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
791123d | 1256.10 ms | 1266.68 ms | 10.58 ms |
202334c | 1265.41 ms | 1277.34 ms | 11.93 ms |
e2f1150 | 1220.39 ms | 1249.94 ms | 29.55 ms |
5ecf9f6 | 1230.76 ms | 1232.86 ms | 2.10 ms |
654f180 | 1220.08 ms | 1248.76 ms | 28.67 ms |
4a188b8 | 1229.81 ms | 1255.96 ms | 26.15 ms |
7138b7d | 1243.40 ms | 1252.08 ms | 8.68 ms |
0fdf0b2 | 1243.92 ms | 1250.86 ms | 6.94 ms |
3e85a23 | 1244.94 ms | 1265.55 ms | 20.61 ms |
5025d2e | 1248.52 ms | 1251.72 ms | 3.20 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
791123d | 20.51 KiB | 331.81 KiB | 311.30 KiB |
202334c | 20.51 KiB | 331.79 KiB | 311.28 KiB |
e2f1150 | 20.51 KiB | 333.10 KiB | 312.59 KiB |
5ecf9f6 | 20.51 KiB | 332.66 KiB | 312.15 KiB |
654f180 | 20.50 KiB | 335.95 KiB | 315.45 KiB |
4a188b8 | 20.50 KiB | 337.70 KiB | 317.20 KiB |
7138b7d | 20.51 KiB | 331.79 KiB | 311.28 KiB |
0fdf0b2 | 20.51 KiB | 332.90 KiB | 312.39 KiB |
3e85a23 | 20.50 KiB | 339.00 KiB | 318.49 KiB |
5025d2e | 20.51 KiB | 331.79 KiB | 311.28 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.
Thanks for this.
Looks like the bug is only during test.
I run the old code in production and it gets the right name, but I believe your change will keep this future proof.
Oh interesting, I wonder if that's because there's no xcdatamodel/NSManagedObjectModel in the unit tests @brustolin ? 🤔 If that's the case and there's no actual user-facing bug right now, i'll remove the changelog entry. |
Im not sure if this is the reason. |
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.
* master: test: Delete empty OOMLogicTests (#2361) fix: profiling transaction timestamps (#2359) fix: profiling transaction thread IDs (#2358) test: Use flush for macOS-SPM sample (#2360) release: 7.30.0 fix: SentryCrash writing nan for invalid number (#2348) HTTP Client errors (#2308) ci: Call make for analyze (#2353) fix: CoreData tracking entity name retrieval (#2329) fix: sampled profile format backend validation errors (#2350) build(deps): bump github/codeql-action from 2.1.29 to 2.1.30 (#2351) build(deps): bump github/codeql-action from 2.1.28 to 2.1.29 (#2344) fix: Fixed flaky testTimezoneChangeNotificationBreadcrumb (#2335) # Conflicts: # Sentry.xcodeproj/project.pbxproj
Fixes #2328 and possible bug in CoreData tracker.
I originally noticed a system error logged for us using a non-designated initializer for an NSManagedObject subclass. Fixing that led to some test failures:
which led to me discovering that we might have only ever tracked CoreData entity transactions using "NSManagedObject" in the span descriptions instead of the actual entity names being used by developers.