Skip to content

Commit 81259ad

Browse files
noahsmartinphilprime
authored andcommitted
ref: Create thread inspector Swift protocol (#6273)
* ref: Create thread inspector Swift protocol * PR feedback
1 parent 62b86c5 commit 81259ad

27 files changed

+83
-60
lines changed

Sentry.xcodeproj/project.pbxproj

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,9 @@
474474
7BA61CBD247BC6B900C130A8 /* TestSentryCrashBinaryImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CBC247BC6B900C130A8 /* TestSentryCrashBinaryImageProvider.swift */; };
475475
7BA61CBF247CEA8100C130A8 /* SentryFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA61CBE247CEA8100C130A8 /* SentryFormatter.h */; settings = {ATTRIBUTES = (Private, ); }; };
476476
7BA61CC6247CFC5F00C130A8 /* SentryCrashDefaultBinaryImageProviderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CC5247CFC5F00C130A8 /* SentryCrashDefaultBinaryImageProviderTests.swift */; };
477-
7BA61CC8247D125400C130A8 /* SentryThreadInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA61CC7247D125400C130A8 /* SentryThreadInspector.h */; };
478-
7BA61CCA247D128B00C130A8 /* SentryThreadInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CC9247D128B00C130A8 /* SentryThreadInspector.m */; };
479-
7BA61CCC247D14E600C130A8 /* SentryThreadInspectorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CCB247D14E600C130A8 /* SentryThreadInspectorTests.swift */; };
477+
7BA61CC8247D125400C130A8 /* SentryDefaultThreadInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA61CC7247D125400C130A8 /* SentryDefaultThreadInspector.h */; };
478+
7BA61CCA247D128B00C130A8 /* SentryDefaultThreadInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CC9247D128B00C130A8 /* SentryDefaultThreadInspector.m */; };
479+
7BA61CCC247D14E600C130A8 /* SentryDefaultThreadInspectorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CCB247D14E600C130A8 /* SentryDefaultThreadInspectorTests.swift */; };
480480
7BA61CCF247EB59500C130A8 /* SentryCrashUUIDConversionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CCE247EB59500C130A8 /* SentryCrashUUIDConversionTests.swift */; };
481481
7BA61EA625F21E660008CAA2 /* SentrySDKLogTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61EA525F21E660008CAA2 /* SentrySDKLogTests.swift */; };
482482
7BA840A024A1EC6E00B718AA /* SentrySDKInternalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA8409F24A1EC6E00B718AA /* SentrySDKInternalTests.swift */; };
@@ -1080,7 +1080,9 @@
10801080
FA7206E12E0B37C80072FDD4 /* SentryProfileCollector.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA7206E02E0B37C60072FDD4 /* SentryProfileCollector.mm */; };
10811081
FA8A36182DEAA1EB0058D883 /* SentryThread+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = FA8A36172DEAA1EB0058D883 /* SentryThread+Private.h */; };
10821082
FA8AFCFA2E844AB6007A0E18 /* SentryThreadsafeApplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8AFCF42E844AB1007A0E18 /* SentryThreadsafeApplicationTests.swift */; };
1083+
FA8AFCED2E8434A8007A0E18 /* SentryThreadInspecting.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8AFCE72E8434A0007A0E18 /* SentryThreadInspecting.swift */; };
10831084
FA8AFDAC2E84FAEE007A0E18 /* TestSentryUIApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA6614FB2E4B8E1500657755 /* TestSentryUIApplication.swift */; };
1085+
FA8AFCED2E8434A8007A0E18 /* SentryThreadInspector.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8AFCE72E8434A0007A0E18 /* SentryThreadInspector.swift */; };
10841086
FA8E58F12E0AD4270049F69D /* SentryDispatchQueueWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8E58F02E0AD4220049F69D /* SentryDispatchQueueWrapper.swift */; };
10851087
FA90FAA82E06614E008CAAE8 /* SentryExtraPackages.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA90FAA72E06614B008CAAE8 /* SentryExtraPackages.swift */; };
10861088
FA90FAFD2E070A3B008CAAE8 /* SentryURLRequestFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA90FAFC2E070A3B008CAAE8 /* SentryURLRequestFactory.swift */; };
@@ -1115,6 +1117,7 @@
11151117
FAEEBFE22E736D4B00E79CA9 /* SentryViewHierarchyProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEEBFDC2E736D4100E79CA9 /* SentryViewHierarchyProvider.swift */; };
11161118
FAEEBFEA2E74517B00E79CA9 /* SentryFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEEBFE92E74517800E79CA9 /* SentryFileManager.swift */; };
11171119
FAEEC0522E75E55F00E79CA9 /* SentrySerializationSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEEC04C2E75E55A00E79CA9 /* SentrySerializationSwift.swift */; };
1120+
FAEEC0522E75E55F00E79CA9 /* SentrySerializationSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEEC04C2E75E55A00E79CA9 /* SentrySerializationSwift.swift */; };
11181121
FAEFA12F2E4FAE1900C431D9 /* SentrySDKSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEFA1292E4FAE1700C431D9 /* SentrySDKSettings.swift */; };
11191122
FAF120182E70C08F006E1DA3 /* SentryEnvelopeHeaderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF120122E70C088006E1DA3 /* SentryEnvelopeHeaderHelper.h */; };
11201123
FAF1201A2E70C0EE006E1DA3 /* SentryEnvelopeHeaderHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FAF120192E70C0EA006E1DA3 /* SentryEnvelopeHeaderHelper.m */; };
@@ -1739,9 +1742,9 @@
17391742
7BA61CBC247BC6B900C130A8 /* TestSentryCrashBinaryImageProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryCrashBinaryImageProvider.swift; sourceTree = "<group>"; };
17401743
7BA61CBE247CEA8100C130A8 /* SentryFormatter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryFormatter.h; path = include/HybridPublic/SentryFormatter.h; sourceTree = "<group>"; };
17411744
7BA61CC5247CFC5F00C130A8 /* SentryCrashDefaultBinaryImageProviderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashDefaultBinaryImageProviderTests.swift; sourceTree = "<group>"; };
1742-
7BA61CC7247D125400C130A8 /* SentryThreadInspector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryThreadInspector.h; path = include/SentryThreadInspector.h; sourceTree = "<group>"; };
1743-
7BA61CC9247D128B00C130A8 /* SentryThreadInspector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryThreadInspector.m; sourceTree = "<group>"; };
1744-
7BA61CCB247D14E600C130A8 /* SentryThreadInspectorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryThreadInspectorTests.swift; sourceTree = "<group>"; };
1745+
7BA61CC7247D125400C130A8 /* SentryDefaultThreadInspector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDefaultThreadInspector.h; path = include/SentryDefaultThreadInspector.h; sourceTree = "<group>"; };
1746+
7BA61CC9247D128B00C130A8 /* SentryDefaultThreadInspector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryDefaultThreadInspector.m; sourceTree = "<group>"; };
1747+
7BA61CCB247D14E600C130A8 /* SentryDefaultThreadInspectorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryDefaultThreadInspectorTests.swift; sourceTree = "<group>"; };
17451748
7BA61CCE247EB59500C130A8 /* SentryCrashUUIDConversionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashUUIDConversionTests.swift; sourceTree = "<group>"; };
17461749
7BA61EA525F21E660008CAA2 /* SentrySDKLogTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKLogTests.swift; sourceTree = "<group>"; };
17471750
7BA8409F24A1EC6E00B718AA /* SentrySDKInternalTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKInternalTests.swift; sourceTree = "<group>"; };
@@ -2421,6 +2424,8 @@
24212424
FA7206E02E0B37C60072FDD4 /* SentryProfileCollector.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryProfileCollector.mm; sourceTree = "<group>"; };
24222425
FA8A36172DEAA1EB0058D883 /* SentryThread+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryThread+Private.h"; path = "include/SentryThread+Private.h"; sourceTree = "<group>"; };
24232426
FA8AFCF42E844AB1007A0E18 /* SentryThreadsafeApplicationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryThreadsafeApplicationTests.swift; sourceTree = "<group>"; };
2427+
FA8AFCE72E8434A0007A0E18 /* SentryThreadInspecting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryThreadInspecting.swift; sourceTree = "<group>"; };
2428+
FA8AFCE72E8434A0007A0E18 /* SentryThreadInspector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryThreadInspector.swift; sourceTree = "<group>"; };
24242429
FA8E58F02E0AD4220049F69D /* SentryDispatchQueueWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryDispatchQueueWrapper.swift; sourceTree = "<group>"; };
24252430
FA90FAA72E06614B008CAAE8 /* SentryExtraPackages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryExtraPackages.swift; sourceTree = "<group>"; };
24262431
FA90FAFC2E070A3B008CAAE8 /* SentryURLRequestFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryURLRequestFactory.swift; sourceTree = "<group>"; };
@@ -2456,6 +2461,7 @@
24562461
FAEEBFDC2E736D4100E79CA9 /* SentryViewHierarchyProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryViewHierarchyProvider.swift; sourceTree = "<group>"; };
24572462
FAEEBFE92E74517800E79CA9 /* SentryFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFileManager.swift; sourceTree = "<group>"; };
24582463
FAEEC04C2E75E55A00E79CA9 /* SentrySerializationSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySerializationSwift.swift; sourceTree = "<group>"; };
2464+
FAEEC04C2E75E55A00E79CA9 /* SentrySerializationSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySerializationSwift.swift; sourceTree = "<group>"; };
24592465
FAEFA1292E4FAE1700C431D9 /* SentrySDKSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKSettings.swift; sourceTree = "<group>"; };
24602466
FAF120122E70C088006E1DA3 /* SentryEnvelopeHeaderHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeHeaderHelper.h; path = include/SentryEnvelopeHeaderHelper.h; sourceTree = "<group>"; };
24612467
FAF120192E70C0EA006E1DA3 /* SentryEnvelopeHeaderHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryEnvelopeHeaderHelper.m; sourceTree = "<group>"; };
@@ -2820,8 +2826,8 @@
28202826
6273513E2CBD14970021D100 /* SentryDebugImageProvider+HybridSDKs.h */,
28212827
7BA61CAC247BAA0B00C130A8 /* SentryDebugImageProvider.m */,
28222828
7BA61CBE247CEA8100C130A8 /* SentryFormatter.h */,
2823-
7BA61CC7247D125400C130A8 /* SentryThreadInspector.h */,
2824-
7BA61CC9247D128B00C130A8 /* SentryThreadInspector.m */,
2829+
7BA61CC7247D125400C130A8 /* SentryDefaultThreadInspector.h */,
2830+
7BA61CC9247D128B00C130A8 /* SentryDefaultThreadInspector.m */,
28252831
7B7D872B2486480B00D2ECFF /* SentryStacktraceBuilder.h */,
28262832
7B7D872D2486482600D2ECFF /* SentryStacktraceBuilder.m */,
28272833
7B14089524878F090035403D /* SentryCrashStackEntryMapper.h */,
@@ -3296,7 +3302,7 @@
32963302
7BA61CBC247BC6B900C130A8 /* TestSentryCrashBinaryImageProvider.swift */,
32973303
7BA61CC5247CFC5F00C130A8 /* SentryCrashDefaultBinaryImageProviderTests.swift */,
32983304
7BA61CCE247EB59500C130A8 /* SentryCrashUUIDConversionTests.swift */,
3299-
7BA61CCB247D14E600C130A8 /* SentryThreadInspectorTests.swift */,
3305+
7BA61CCB247D14E600C130A8 /* SentryDefaultThreadInspectorTests.swift */,
33003306
7B5AB65C27E48E5200F1D1BA /* TestThreadInspector.swift */,
33013307
7B7D872F248648AD00D2ECFF /* SentryStacktraceBuilderTests.swift */,
33023308
7B140899248791660035403D /* SentryCrashStackEntryMapperTests.swift */,
@@ -4738,6 +4744,8 @@
47384744
F4FE9E062E6248BB0014FED5 /* SentryCrash */ = {
47394745
isa = PBXGroup;
47404746
children = (
4747+
FA8AFCE72E8434A0007A0E18 /* SentryThreadInspecting.swift */,
4748+
FA8AFCE72E8434A0007A0E18 /* SentryThreadInspector.swift */,
47414749
FAE579C62E7DE14400B710F9 /* SentryFrameRemover.swift */,
47424750
F4FE9E072E6248E40014FED5 /* SentryCrashWrapper.swift */,
47434751
);
@@ -5114,7 +5122,7 @@
51145122
D8B088B629C9E3FF00213258 /* SentryTracerConfiguration.h in Headers */,
51155123
7B63459D280EBA6300CFA05A /* SentryUIEventTracker.h in Headers */,
51165124
7B7D873424864C6600D2ECFF /* SentryCrashDefaultMachineContextWrapper.h in Headers */,
5117-
7BA61CC8247D125400C130A8 /* SentryThreadInspector.h in Headers */,
5125+
7BA61CC8247D125400C130A8 /* SentryDefaultThreadInspector.h in Headers */,
51185126
63FE713320DA4C1100CDBAE8 /* SentryCrashCPU.h in Headers */,
51195127
6271ADF32BA06D9B0098D2E9 /* SentryInternalSerializable.h in Headers */,
51205128
D8853C842833EABC00700D64 /* SentryANRTrackerV1.h in Headers */,
@@ -5551,6 +5559,8 @@
55515559
isa = PBXSourcesBuildPhase;
55525560
buildActionMask = 2147483647;
55535561
files = (
5562+
FA8AFCED2E8434A8007A0E18 /* SentryThreadInspecting.swift in Sources */,
5563+
FA8AFCED2E8434A8007A0E18 /* SentryThreadInspector.swift in Sources */,
55545564
7BFC16A125249A9D00FF6266 /* SentryMessage.m in Sources */,
55555565
FA90FAFD2E070A3B008CAAE8 /* SentryURLRequestFactory.swift in Sources */,
55565566
7BCFBD6F2681D0EE00BC27D8 /* SentryCrashScopeObserver.m in Sources */,
@@ -5620,7 +5630,7 @@
56205630
620078742D38F0DF0022CB67 /* SentryCodable.swift in Sources */,
56215631
63FE713B20DA4C1100CDBAE8 /* SentryCrashFileUtils.c in Sources */,
56225632
63FE716920DA4C1100CDBAE8 /* SentryCrashStackCursor.c in Sources */,
5623-
7BA61CCA247D128B00C130A8 /* SentryThreadInspector.m in Sources */,
5633+
7BA61CCA247D128B00C130A8 /* SentryDefaultThreadInspector.m in Sources */,
56245634
623FD9042D3FA92700803EDA /* NSNumberDecodableWrapper.swift in Sources */,
56255635
63FE718D20DA4C1100CDBAE8 /* SentryCrashReportStore.c in Sources */,
56265636
7BA0C0482805600A003E0326 /* SentryTransportAdapter.m in Sources */,
@@ -6150,7 +6160,7 @@
61506160
7B59398424AB481B0003AAD2 /* NotificationCenterTestCase.swift in Sources */,
61516161
7B0A542E2521C62400A71716 /* SentryFrameRemoverTests.swift in Sources */,
61526162
7BE912B12721C76000E49E62 /* SentryPerformanceTrackingIntegrationTests.swift in Sources */,
6153-
7BA61CCC247D14E600C130A8 /* SentryThreadInspectorTests.swift in Sources */,
6163+
7BA61CCC247D14E600C130A8 /* SentryDefaultThreadInspectorTests.swift in Sources */,
61546164
623C45B02A651D8200D9E88B /* SentryCoreDataTracker+Test.m in Sources */,
61556165
8E0551E026A7A63C00400526 /* TestProtocolClient.swift in Sources */,
61566166
7BD86ECD264A78A6005439DB /* SentryAppStartTrackerTests.swift in Sources */,

SentryTestUtils/SentryTestUtils-ObjC-BridgingHeader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#import "SentryCrashInstallation+Private.h"
3232
#import "SentryCrashMonitor_MachException.h"
3333
#import "SentryDebugImageProvider+HybridSDKs.h"
34+
#import "SentryDefaultThreadInspector.h"
3435
#import "SentryDependencyContainer.h"
3536
#import "SentryFileManager+Test.h"
3637
#import "SentryFileManagerHelper.h"
@@ -45,7 +46,6 @@
4546
#import "SentryScopeSyncC.h"
4647
#import "SentrySwizzleWrapper.h"
4748
#import "SentrySystemWrapper.h"
48-
#import "SentryThreadInspector.h"
4949
#import "SentryTraceContext.h"
5050
#import "SentryTracer+Test.h"
5151
#import "SentryTransaction.h"

SentryTestUtils/TestClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class TestClient: SentryClient {
2626

2727
// Without this override we get a fatal error: use of unimplemented initializer
2828
// see https://stackoverflow.com/questions/28187261/ios-swift-fatal-error-use-of-unimplemented-initializer-init
29-
@_spi(Private) public override init(options: Options, transportAdapter: SentryTransportAdapter, fileManager: SentryFileManager, deleteOldEnvelopeItems: Bool, threadInspector: SentryThreadInspector, debugImageProvider: SentryDebugImageProvider, random: SentryRandomProtocol, locale: Locale, timezone: TimeZone) {
29+
@_spi(Private) public override init(options: Options, transportAdapter: SentryTransportAdapter, fileManager: SentryFileManager, deleteOldEnvelopeItems: Bool, threadInspector: SentryDefaultThreadInspector, debugImageProvider: SentryDebugImageProvider, random: SentryRandomProtocol, locale: Locale, timezone: TimeZone) {
3030
super.init(
3131
options: options,
3232
transportAdapter: transportAdapter,

Sources/Sentry/SentryANRTrackingIntegration.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#import "SentryStacktrace.h"
1414
#import "SentrySwift.h"
1515
#import "SentryThread.h"
16-
#import "SentryThreadInspector.h"
1716
#import <SentryOptions+Private.h>
1817

1918
#if SENTRY_HAS_UIKIT
@@ -32,7 +31,7 @@ @interface SentryANRTrackingIntegration () <SentryANRTrackerDelegate>
3231
@property (nonatomic, strong) SentryDispatchQueueWrapper *dispatchQueueWrapper;
3332
@property (nonatomic, strong) SentryCrashWrapper *crashWrapper;
3433
@property (nonatomic, strong) SentryDebugImageProvider *debugImageProvider;
35-
@property (nonatomic, strong) SentryThreadInspector *threadInspector;
34+
@property (nonatomic, strong) id<SentryThreadInspector> threadInspector;
3635
@property (atomic, assign) BOOL reportAppHangs;
3736
@property (atomic, assign) BOOL enableReportNonFullyBlockingAppHangs;
3837

Sources/Sentry/SentryClient.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#import "SentryCrashIntegration.h"
77
#import "SentryCrashStackEntryMapper.h"
88
#import "SentryDebugImageProvider+HybridSDKs.h"
9+
#import "SentryDefaultThreadInspector.h"
910
#import "SentryDependencyContainer.h"
1011
#import "SentryDsn.h"
1112
#import "SentryEvent+Private.h"
@@ -31,7 +32,6 @@
3132
#import "SentrySerialization.h"
3233
#import "SentryStacktraceBuilder.h"
3334
#import "SentrySwift.h"
34-
#import "SentryThreadInspector.h"
3535
#import "SentryTraceContext.h"
3636
#import "SentryTracer.h"
3737
#import "SentryTransaction.h"
@@ -116,8 +116,8 @@ - (instancetype)initWithOptions:(SentryOptions *)options
116116
transportAdapter:(SentryTransportAdapter *)transportAdapter
117117

118118
{
119-
SentryThreadInspector *threadInspector =
120-
[[SentryThreadInspector alloc] initWithOptions:options];
119+
SentryDefaultThreadInspector *threadInspector =
120+
[[SentryDefaultThreadInspector alloc] initWithOptions:options];
121121

122122
return [self initWithOptions:options
123123
transportAdapter:transportAdapter
@@ -134,7 +134,7 @@ - (instancetype)initWithOptions:(SentryOptions *)options
134134
transportAdapter:(SentryTransportAdapter *)transportAdapter
135135
fileManager:(SentryFileManager *)fileManager
136136
deleteOldEnvelopeItems:(BOOL)deleteOldEnvelopeItems
137-
threadInspector:(SentryThreadInspector *)threadInspector
137+
threadInspector:(SentryDefaultThreadInspector *)threadInspector
138138
debugImageProvider:(SentryDebugImageProvider *)debugImageProvider
139139
random:(id<SentryRandomProtocol>)random
140140
locale:(NSLocale *)locale

Sources/Sentry/SentryCoreDataTracker.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
#import "SentryCoreDataTracker.h"
3+
#import "SentryDefaultThreadInspector.h"
34
#import "SentryFrame.h"
45
#import "SentryHub+Private.h"
56
#import "SentryInternalDefines.h"
@@ -12,16 +13,15 @@
1213
#import "SentrySpanProtocol.h"
1314
#import "SentryStacktrace.h"
1415
#import "SentrySwift.h"
15-
#import "SentryThreadInspector.h"
1616
#import "SentryTraceOrigin.h"
1717

1818
@implementation SentryCoreDataTracker {
1919
SentryPredicateDescriptor *predicateDescriptor;
20-
SentryThreadInspector *_threadInspector;
20+
SentryDefaultThreadInspector *_threadInspector;
2121
id<SentryProcessInfoSource> _processInfoWrapper;
2222
}
2323

24-
- (instancetype)initWithThreadInspector:(SentryThreadInspector *)threadInspector
24+
- (instancetype)initWithThreadInspector:(SentryDefaultThreadInspector *)threadInspector
2525
processInfoWrapper:(id<SentryProcessInfoSource>)processInfoWrapper;
2626
{
2727
if (self = [super init]) {

Sources/Sentry/SentryCoreDataTrackingIntegration.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#import "SentryCoreDataTrackingIntegration.h"
22
#import "SentryCoreDataSwizzling.h"
33
#import "SentryCoreDataTracker.h"
4+
#import "SentryDefaultThreadInspector.h"
45
#import "SentryDependencyContainer.h"
56
#import "SentryLogC.h"
67
#import "SentryNSDataSwizzling.h"
78
#import "SentryOptions.h"
8-
#import "SentryThreadInspector.h"
99

1010
@interface SentryCoreDataTrackingIntegration ()
1111

@@ -22,7 +22,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options
2222
}
2323

2424
self.tracker = [[SentryCoreDataTracker alloc]
25-
initWithThreadInspector:[[SentryThreadInspector alloc] initWithOptions:options]
25+
initWithThreadInspector:[[SentryDefaultThreadInspector alloc] initWithOptions:options]
2626
processInfoWrapper:[SentryDependencyContainer.sharedInstance processInfoWrapper]];
2727
[SentryCoreDataSwizzling.sharedInstance startWithTracker:self.tracker];
2828

0 commit comments

Comments
 (0)