File tree Expand file tree Collapse file tree 4 files changed +40
-5
lines changed Expand file tree Collapse file tree 4 files changed +40
-5
lines changed Original file line number Diff line number Diff line change 1313#import " SentrySDK+Private.h"
1414#import " SentrySerialization.h"
1515#import " SentrySessionReplayIntegration+Private.h"
16- #import " SentrySwift.h"
1716#import " SentryThreadHandle.hpp"
1817#import " SentryUser+Private.h"
1918#import " SentryViewHierarchy.h"
2827#if SENTRY_TARGET_PROFILING_SUPPORTED
2928# import " SentryProfiledTracerConcurrency.h"
3029# import " SentryProfilerSerialization.h"
30+ # import " SentrySwift.h"
3131# import " SentryTraceProfiler.h"
3232#endif // SENTRY_TARGET_PROFILING_SUPPORTED
3333
Original file line number Diff line number Diff line change 44#import " SentrySpanContext+Private.h"
55#import " SentrySwift.h"
66#import " SentryThread.h"
7- #include " SentryThreadHandle.hpp"
87#import " SentryTraceOrigin.h"
98#import " SentryTransactionContext+Private.h"
9+ #import " ThreadInfoHelper.h"
1010
1111NS_ASSUME_NONNULL_BEGIN
1212
13- static const auto kSentryDefaultSamplingDecision = kSentrySampleDecisionUndecided ;
13+ static const NSUInteger kSentryDefaultSamplingDecision = kSentrySampleDecisionUndecided ;
1414
1515@implementation SentryTransactionContext
1616
@@ -197,8 +197,7 @@ - (instancetype)initWithName:(NSString *)name
197197- (void )getThreadInfo
198198{
199199#if SENTRY_TARGET_PROFILING_SUPPORTED
200- const auto threadID = sentry::profiling::ThreadHandle::current ()->tid ();
201- self.threadInfo = [[SentryThread alloc ] initWithThreadId: @(threadID)];
200+ self.threadInfo = [ThreadInfoHelper threadInfo ];
202201#endif
203202}
204203
Original file line number Diff line number Diff line change 1+ #import " ThreadInfoHelper.h"
2+ #import " SentryThread.h"
3+ #include " SentryThreadHandle.hpp"
4+
5+ #if SENTRY_TARGET_PROFILING_SUPPORTED
6+
7+ @implementation ThreadInfoHelper
8+
9+ + (SentryThread *)threadInfo
10+ {
11+ const auto threadID = sentry::profiling::ThreadHandle::current ()->tid ();
12+ return [[SentryThread alloc ] initWithThreadId: @(threadID)];
13+ }
14+
15+ @end
16+
17+ #endif
Original file line number Diff line number Diff line change 1+ #include " SentryProfilingConditionals.h"
2+ #import < Foundation/Foundation.h>
3+
4+ #if SENTRY_TARGET_PROFILING_SUPPORTED
5+
6+ @class SentryThread;
7+
8+ NS_ASSUME_NONNULL_BEGIN
9+
10+ // Helper function to access C++ in a file that does not import Swift
11+ @interface ThreadInfoHelper : NSObject
12+
13+ + (SentryThread *)threadInfo ;
14+
15+ @end
16+
17+ NS_ASSUME_NONNULL_END
18+
19+ #endif
You can’t perform that action at this time.
0 commit comments