Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
getsentry-bot committed Sep 27, 2022
1 parent 882daa9 commit e121d44
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ + (void)captureEnvelopeIfFinished:(SentryProfiler *)profiler spanID:(SentrySpanI
[profiler captureEnvelope];
[profiler->_transactions removeAllObjects];
} else {
SENTRY_LOG_DEBUG(@"Profiler %@ is waiting for more spans to complete: %@.", profiler, profiler->_spansInFlight);
SENTRY_LOG_DEBUG(@"Profiler %@ is waiting for more spans to complete: %@.", profiler,
profiler->_spansInFlight);
}
}

Expand Down
18 changes: 12 additions & 6 deletions Sources/Sentry/SentryTracer.m
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ - (void)cancelIdleTimeout
context.spanDescription = description;

SentrySpan *child = [[SentrySpan alloc] initWithTracer:self context:context];
SENTRY_LOG_DEBUG(@"Started child span %@ under %@", child.context.spanId.sentrySpanIdString, parentId.sentrySpanIdString);
SENTRY_LOG_DEBUG(@"Started child span %@ under %@", child.context.spanId.sentrySpanIdString,
parentId.sentrySpanIdString);
@synchronized(_children) {
[_children addObject:child];
}
Expand All @@ -259,7 +260,8 @@ - (void)spanFinished:(id<SentrySpan>)finishedSpan
// Calling canBeFinished on the rootSpan would end up in an endless loop because canBeFinished
// calls finish on the rootSpan.
if (finishedSpan == self.rootSpan) {
SENTRY_LOG_DEBUG(@"Cannot call finish on root span with id %@", finishedSpan.context.spanId.sentrySpanIdString);
SENTRY_LOG_DEBUG(@"Cannot call finish on root span with id %@",
finishedSpan.context.spanId.sentrySpanIdString);
return;
}
[self canBeFinished];
Expand Down Expand Up @@ -389,18 +391,22 @@ - (void)canBeFinished
// Sending another transaction and spans with
// the same SentryId would be an error.
if (self.rootSpan.isFinished) {
SENTRY_LOG_DEBUG(@"Root span with id %@ is already finished", self.rootSpan.context.spanId.sentrySpanIdString);
SENTRY_LOG_DEBUG(@"Root span with id %@ is already finished",
self.rootSpan.context.spanId.sentrySpanIdString);
return;
}

BOOL hasChildrenToWaitFor = [self hasChildrenToWaitFor];
if (!self.isWaitingForChildren) {
SENTRY_LOG_DEBUG(@"Root span with id %@ is not waiting for children to finish.", self.rootSpan.context.spanId.sentrySpanIdString);
SENTRY_LOG_DEBUG(@"Root span with id %@ is not waiting for children to finish.",
self.rootSpan.context.spanId.sentrySpanIdString);
if (!hasChildrenToWaitFor && [self hasIdleTimeout]) {
SENTRY_LOG_DEBUG(@"Root span with id %@ is waiting for idle timeout, won't finish now.", self.rootSpan.context.spanId.sentrySpanIdString);
SENTRY_LOG_DEBUG(@"Root span with id %@ is waiting for idle timeout, won't finish now.",
self.rootSpan.context.spanId.sentrySpanIdString);
[self dispatchIdleTimeout];
}
SENTRY_LOG_DEBUG(@"Root span with id %@ is waiting for idle timeout, won't finish now.", self.rootSpan.context.spanId.sentrySpanIdString);
SENTRY_LOG_DEBUG(@"Root span with id %@ is waiting for idle timeout, won't finish now.",
self.rootSpan.context.spanId.sentrySpanIdString);
return;
}

Expand Down

0 comments on commit e121d44

Please sign in to comment.