-
-
Notifications
You must be signed in to change notification settings - Fork 366
ref: Create thread inspector Swift protocol #6273
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
Sources/Sentry/include/HybridPublic/SentryDependencyContainer.h
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6273 +/- ##
=============================================
- Coverage 86.824% 7.556% -79.268%
=============================================
Files 438 404 -34
Lines 37328 35623 -1705
Branches 17438 14059 -3379
=============================================
- Hits 32410 2692 -29718
- Misses 4875 32920 +28045
+ Partials 43 11 -32
... and 412 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
bf419f3
to
0fd27d6
Compare
1bb0934
to
fe50cb1
Compare
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5cfc768 | 1220.74 ms | 1245.06 ms | 24.32 ms |
e3ebff3 | 1223.47 ms | 1249.27 ms | 25.80 ms |
fccc4e5 | 1237.80 ms | 1264.16 ms | 26.37 ms |
35f71f4 | 1208.96 ms | 1225.61 ms | 16.65 ms |
fae97e5 | 1229.20 ms | 1256.27 ms | 27.06 ms |
aff3b66 | 1229.53 ms | 1263.08 ms | 33.55 ms |
ea2e54c | 1207.78 ms | 1218.13 ms | 10.35 ms |
07d7e83 | 1211.71 ms | 1240.08 ms | 28.37 ms |
b045d0a | 1227.48 ms | 1252.22 ms | 24.75 ms |
f5666e7 | 1227.08 ms | 1260.18 ms | 33.10 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5cfc768 | 23.75 KiB | 850.73 KiB | 826.98 KiB |
e3ebff3 | 23.75 KiB | 878.48 KiB | 854.73 KiB |
fccc4e5 | 23.75 KiB | 974.94 KiB | 951.19 KiB |
35f71f4 | 23.75 KiB | 969.25 KiB | 945.50 KiB |
fae97e5 | 23.75 KiB | 912.37 KiB | 888.62 KiB |
aff3b66 | 23.75 KiB | 978.53 KiB | 954.78 KiB |
ea2e54c | 23.75 KiB | 919.70 KiB | 895.95 KiB |
07d7e83 | 23.75 KiB | 913.27 KiB | 889.52 KiB |
b045d0a | 23.75 KiB | 880.21 KiB | 856.46 KiB |
f5666e7 | 23.75 KiB | 963.18 KiB | 939.43 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'm a bit confused. Can't the SentryThreadInspector
implement the SentryThreadInspecting
protocol? Then, the SentryDependencyContainer
doesn't need to have a private property @property (nonatomic, strong) SentryThreadInspector *threadInspector;
. We can have one public property for the new interface SentryThreadInspecting
and it whould work.
Sources/Sentry/include/HybridPublic/SentryDependencyContainer.h
Outdated
Show resolved
Hide resolved
Thanks @philipphofmann just made those changes |
f19894e
to
da10f3b
Compare
🚨 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:
|
This removes
SentryThreadInspector
from the dependency container public interface, in favor of a protocol defined in Swift. This means we don't need to convert the entire thing to Swift before the dependency containerResolves https://linear.app/getsentry/issue/COCOA-608/convert-sentrycrashstackentrymapper-to-swift and https://linear.app/getsentry/issue/COCOA-708/convert-sentrythreadinspector and https://linear.app/getsentry/issue/COCOA-707/convert-sentrystacktracebuilder
#skip-changelog
Note
Replaces public SentryThreadInspector exposure with Swift protocols and a SentryDefaultThreadInspector implementation, updating dependencies, integrations, and tests accordingly.
SentryThreadInspector
andSentryThreadInspecting
for thread inspection.SentryThreadInspector
→SentryDefaultThreadInspector
and migrate call sites.SentryDependencyContainer
: exposethreadInspector
asid<SentryThreadInspector>
and lazily instantiateSentryDefaultThreadInspector
.SentryClient
: ctor now takes/createsSentryDefaultThreadInspector
and stores it; uses it for attaching threads/stacktraces.SentryDefaultThreadInspector
and usegetCurrentThreads*
/stacktraceForCurrentThreadAsyncUnsafe
.SentryThreadInspector.swift
,SentryThreadInspecting.swift
.SentryDefaultThreadInspectorTests
; adapt helpers (TestThreadInspector
) and bridging headers/imports.SentryProfileTimeseries.h
: switch UIKit import toSentryProfilerDefines
.Written by Cursor Bugbot for commit da10f3b. This will update automatically on new commits. Configure here.