|
167 | 167 | } |
168 | 168 |
|
169 | 169 | void |
170 | | -sentry_discardProfilerCorrelatedToTrace(SentryId *internalTraceId, SentryHub *hub) |
| 170 | +sentry_discardProfilerCorrelatedToTrace(SentryId *internalTraceId, SentryHubInternal *hub) |
171 | 171 | { |
172 | 172 | std::lock_guard<std::mutex> l(_gStateLock); |
173 | 173 |
|
|
238 | 238 | } |
239 | 239 |
|
240 | 240 | void |
241 | | -sentry_stopProfilerDueToFinishedTransaction( |
242 | | - SentryHub *hub, SentryDispatchQueueWrapper *dispatchQueue, SentryTransaction *transaction, |
243 | | - BOOL isProfiling, NSDate *_Nullable traceStartTimestamp, uint64_t startSystemTime |
| 241 | +sentry_stopProfilerDueToFinishedTransaction(SentryHubInternal *hub, |
| 242 | + SentryDispatchQueueWrapper *dispatchQueue, SentryTransaction *transaction, BOOL isProfiling, |
| 243 | + NSDate *_Nullable traceStartTimestamp, uint64_t startSystemTime |
244 | 244 | # if SENTRY_HAS_UIKIT |
245 | 245 | , |
246 | 246 | SentryAppStartMeasurement *appStartMeasurement |
|
256 | 256 | return; |
257 | 257 | } |
258 | 258 |
|
259 | | - SentryClient *_Nullable client = hub.getClient; |
| 259 | + SentryClientInternal *_Nullable client = hub.getClient; |
260 | 260 | if (isProfiling && client != nil |
261 | | - && sentry_isContinuousProfilingEnabled(SENTRY_UNWRAP_NULLABLE(SentryClient, client)) |
262 | | - && sentry_isProfilingCorrelatedToTraces(SENTRY_UNWRAP_NULLABLE(SentryClient, client))) { |
| 261 | + && sentry_isContinuousProfilingEnabled(SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client)) |
| 262 | + && sentry_isProfilingCorrelatedToTraces( |
| 263 | + SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client))) { |
263 | 264 | SENTRY_LOG_DEBUG(@"Stopping tracking root span tracer with profilerReferenceId %@", |
264 | 265 | sentry_stringFromSentryID(transaction.trace.profilerReferenceID)); |
265 | 266 | sentry_stopTrackingRootSpanForContinuousProfilerV2(); |
|
334 | 335 | } |
335 | 336 |
|
336 | 337 | SentryId *_Nullable sentry_startProfilerForTrace(SentryTracerConfiguration *configuration, |
337 | | - SentryHub *_Nullable hub, SentryTransactionContext *transactionContext) |
| 338 | + SentryHubInternal *_Nullable hub, SentryTransactionContext *transactionContext) |
338 | 339 | { |
339 | 340 | if (sentry_profileConfiguration.profileOptions != nil) { |
340 | 341 | // launch profile; there's no hub to get options from, so they're read from the launch |
341 | 342 | // profile config file |
342 | 343 | return _sentry_startContinuousProfilerV2ForTrace( |
343 | 344 | sentry_profileConfiguration.profileOptions, transactionContext); |
344 | 345 | } |
345 | | - SentryClient *_Nullable client = hub.getClient; |
| 346 | + SentryClientInternal *_Nullable client = hub.getClient; |
346 | 347 | if (client != nil |
347 | | - && sentry_isContinuousProfilingEnabled(SENTRY_UNWRAP_NULLABLE(SentryClient, client))) { |
| 348 | + && sentry_isContinuousProfilingEnabled( |
| 349 | + SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client))) { |
348 | 350 | // non launch profile |
349 | 351 | if (sentry_getParentSpanID(transactionContext) != nil) { |
350 | 352 | SENTRY_LOG_DEBUG(@"Not a root span, will not start automatically for trace lifecycle."); |
351 | 353 | return nil; |
352 | 354 | } |
353 | 355 | SentryProfileOptions *_Nullable profilingOptions |
354 | | - = sentry_getProfiling(SENTRY_UNWRAP_NULLABLE(SentryClient, client)); |
| 356 | + = sentry_getProfiling(SENTRY_UNWRAP_NULLABLE(SentryClientInternal, client)); |
355 | 357 | if (profilingOptions == nil) { |
356 | 358 | SENTRY_LOG_DEBUG(@"No profiling options found, will not start profiler."); |
357 | 359 | return nil; |
|
0 commit comments