|
25 | 25 | /* number of in-flight tracers */ NSNumber *> *_gProfilersToTracers; |
26 | 26 |
|
27 | 27 | /** provided for fast access to a profiler given a tracer */ |
28 | | -static NSMutableDictionary</* SentryTracer.tracerId */ NSString *, SentryProfiler *> |
| 28 | +static NSMutableDictionary</* SentryTracer.internalTraceId */ NSString *, SentryProfiler *> |
29 | 29 | *_gTracersToProfilers; |
30 | 30 |
|
31 | 31 | namespace { |
|
54 | 54 | std::mutex _gStateLock; |
55 | 55 |
|
56 | 56 | void |
57 | | -trackProfilerForTracer(SentryProfiler *profiler, SentryId *traceId) |
| 57 | +trackProfilerForTracer(SentryProfiler *profiler, SentryId *internalTraceId) |
58 | 58 | { |
59 | 59 | std::lock_guard<std::mutex> l(_gStateLock); |
60 | 60 |
|
61 | 61 | const auto profilerKey = profiler.profilerId.sentryIdString; |
62 | | - const auto tracerKey = traceId.sentryIdString; |
| 62 | + const auto tracerKey = internalTraceId.sentryIdString; |
63 | 63 |
|
64 | 64 | SENTRY_LOG_DEBUG( |
65 | 65 | @"Tracking relationship between profiler id %@ and tracer id %@", profilerKey, tracerKey); |
|
73 | 73 | /* number of in-flight tracers */ NSNumber *> |
74 | 74 | dictionary]; |
75 | 75 | _gTracersToProfilers = |
76 | | - [NSMutableDictionary</* SentryTracer.tracerId */ NSString *, SentryProfiler *> |
| 76 | + [NSMutableDictionary</* SentryTracer.internalTraceId */ NSString *, SentryProfiler *> |
77 | 77 | dictionary]; |
78 | 78 | } |
79 | 79 |
|
|
82 | 82 | } |
83 | 83 |
|
84 | 84 | void |
85 | | -discardProfilerForTracer(SentryId *traceId) |
| 85 | +discardProfilerForTracer(SentryId *internalTraceId) |
86 | 86 | { |
87 | 87 | std::lock_guard<std::mutex> l(_gStateLock); |
88 | 88 |
|
89 | 89 | SENTRY_CASSERT(_gTracersToProfilers != nil && _gProfilersToTracers != nil, |
90 | 90 | @"Structures should have already been initialized by the time they are being queried"); |
91 | 91 |
|
92 | | - const auto tracerKey = traceId.sentryIdString; |
| 92 | + const auto tracerKey = internalTraceId.sentryIdString; |
93 | 93 | const auto profiler = _gTracersToProfilers[tracerKey]; |
94 | 94 |
|
95 | 95 | if (profiler == nil) { |
|
105 | 105 | # endif // SENTRY_HAS_UIKIT |
106 | 106 | } |
107 | 107 |
|
108 | | -SentryProfiler *_Nullable profilerForFinishedTracer(SentryId *traceId) |
| 108 | +SentryProfiler *_Nullable profilerForFinishedTracer(SentryId *internalTraceId) |
109 | 109 | { |
110 | 110 | std::lock_guard<std::mutex> l(_gStateLock); |
111 | 111 |
|
112 | 112 | SENTRY_CASSERT(_gTracersToProfilers != nil && _gProfilersToTracers != nil, |
113 | 113 | @"Structures should have already been initialized by the time they are being queried"); |
114 | 114 |
|
115 | | - const auto tracerKey = traceId.sentryIdString; |
| 115 | + const auto tracerKey = internalTraceId.sentryIdString; |
116 | 116 | const auto profiler = _gTracersToProfilers[tracerKey]; |
117 | 117 |
|
118 | 118 | if (!SENTRY_CASSERT_RETURN(profiler != nil, |
|
0 commit comments