Skip to content

Commit

Permalink
Merge 6bbebc7 into b34716f
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin authored Dec 4, 2024
2 parents b34716f + 6bbebc7 commit 895b829
Show file tree
Hide file tree
Showing 22 changed files with 323 additions and 141 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Features

- SwiftUI time for initial display and time for full display (#4596)

### Fixes

- Fix GraphQL context for HTTP client error tracking (#4567)
Expand All @@ -26,7 +30,6 @@
- Load integration from same binary (#4541)
- Masking for fast animations #4574


### Improvements

- impr: Speed up getBinaryImages V2 (#4539). Follow up on (#4435)
Expand Down
19 changes: 19 additions & 0 deletions Samples/iOS-SwiftUI/iOS-SwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
D8199DCE29376FD90074249E /* SentrySwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D832FAF02982A908007A9A5F /* FormScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D832FAEF2982A908007A9A5F /* FormScreen.swift */; };
D85388D12980222500B63908 /* UIKitScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85388D02980222500B63908 /* UIKitScreen.swift */; };
D8F0F3C02D0068A100826CE3 /* SentrySwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; };
D8F0F3C12D0068A100826CE3 /* SentrySwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D8F0F3C42D0068AB00826CE3 /* SentryRedactModifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0F3C32D0068AB00826CE3 /* SentryRedactModifierTests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -130,6 +133,17 @@
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
D8F0F3C22D0068A100826CE3 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
D8F0F3C12D0068A100826CE3 /* SentrySwiftUI.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -159,13 +173,15 @@
D8A22A7C2915231F006907D9 /* SentrySpanStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentrySpanStatus.h; sourceTree = "<group>"; };
D8A22A7D2915238A006907D9 /* SentryTracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryTracer.h; path = ../../../../Sources/Sentry/include/SentryTracer.h; sourceTree = "<group>"; };
D8A22A7E2915238A006907D9 /* SentryPerformanceTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryPerformanceTracker.h; path = ../../../../Sources/Sentry/include/SentryPerformanceTracker.h; sourceTree = "<group>"; };
D8F0F3C32D0068AB00826CE3 /* SentryRedactModifierTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRedactModifierTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
7B64385426A6C0A6000D0F65 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D8F0F3C02D0068A100826CE3 /* SentrySwiftUI.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -198,6 +214,7 @@
isa = PBXGroup;
children = (
7B64385926A6C0A6000D0F65 /* LaunchUITests.swift */,
D8F0F3C32D0068AB00826CE3 /* SentryRedactModifierTests.swift */,
7B64385B26A6C0A6000D0F65 /* Info.plist */,
);
path = "iOS-SwiftUI-UITests";
Expand Down Expand Up @@ -306,6 +323,7 @@
7B64385326A6C0A6000D0F65 /* Sources */,
7B64385426A6C0A6000D0F65 /* Frameworks */,
7B64385526A6C0A6000D0F65 /* Resources */,
D8F0F3C22D0068A100826CE3 /* Embed Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -535,6 +553,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8F0F3C42D0068AB00826CE3 /* SentryRedactModifierTests.swift in Sources */,
7B64385A26A6C0A6000D0F65 /* LaunchUITests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
14 changes: 11 additions & 3 deletions Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,27 @@ struct ContentView: View {
}

var body: some View {
return SentryTracedView("Content View Body") {
NavigationView {
return SentryTracedView("Content View Body", waitForFullDisplay: true) { NavigationView {
VStack(alignment: HorizontalAlignment.center, spacing: 16) {
Group {
Text(getCurrentTracer()?.transactionContext.name ?? "NO SPAN")
.accessibilityIdentifier("TRANSACTION_NAME")

Text(getCurrentTracer()?.transactionContext.spanId.sentrySpanIdString ?? "NO ID")
.accessibilityIdentifier("TRANSACTION_ID")
.sentryReplayMask()

Text(getCurrentTracer()?.transactionContext.origin ?? "NO ORIGIN")
.accessibilityIdentifier("TRACE_ORIGIN")
}.sentryReplayUnmask()
.onAppear {
Task {
if #available(iOS 16.0, *) {
try? await Task.sleep(for: .seconds(2))
}
SentrySDK.reportFullyDisplayed()
}
}
SentryTracedView("Child Span") {
VStack {
Text(getCurrentSpan()?.spanDescription ?? "NO SPAN")
Expand Down Expand Up @@ -205,7 +213,7 @@ struct ContentView: View {
}
SecondView()
}
}
}
}
}
}
Expand Down
33 changes: 4 additions & 29 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,6 @@
D84F833E2A1CC401005828E0 /* SentrySwiftAsyncIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = D84F833C2A1CC401005828E0 /* SentrySwiftAsyncIntegration.m */; };
D851527F2C9971020070F669 /* SentryStringUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = D851527E2C9971020070F669 /* SentryStringUtils.h */; };
D85152832C997A280070F669 /* SentryStringUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85152822C997A1F0070F669 /* SentryStringUtils.swift */; };
D85153002CA2B5F60070F669 /* SentrySwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8199DAA29376E9B0074249E /* SentrySwiftUI.framework */; };
D85153012CA2B5F60070F669 /* SentrySwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D8199DAA29376E9B0074249E /* SentrySwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D851530C2CA2B7B00070F669 /* SentryRedactModifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D851530B2CA2B7A30070F669 /* SentryRedactModifierTests.swift */; };
D85596F3280580F10041FF8B /* SentryScreenshotIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = D85596F1280580F10041FF8B /* SentryScreenshotIntegration.m */; };
D855AD62286ED6A4002573E1 /* SentryCrashTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D855AD61286ED6A4002573E1 /* SentryCrashTests.m */; };
D855B3E827D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D855B3E727D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift */; };
Expand Down Expand Up @@ -928,6 +925,7 @@
D8DBE0D22C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBE0D12C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift */; };
D8F016B32B9622D6007B9AFB /* SentryId.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B22B9622D6007B9AFB /* SentryId.swift */; };
D8F016B62B962548007B9AFB /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B52B962548007B9AFB /* StringExtensions.swift */; };
D8F0F3B72D005B0400826CE3 /* TracingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0F3B62D005AFB00826CE3 /* TracingView.swift */; };
D8F67AEE2BE0D19200C9197B /* UIImageHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */; };
D8F67AF12BE0D33F00C9197B /* UIImageHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */; };
D8F67AF42BE10F9600C9197B /* UIRedactBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */; };
Expand Down Expand Up @@ -977,13 +975,6 @@
remoteGlobalIDString = D84DAD4C2B17428D003CF120;
remoteInfo = SentryTestUtilsDynamic;
};
D85153022CA2B5F60070F669 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6327C5CA1EB8A783004E799B /* Project object */;
proxyType = 1;
remoteGlobalIDString = D8199DA929376E9B0074249E;
remoteInfo = SentrySwiftUI;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -994,7 +985,6 @@
dstSubfolderSpec = 10;
files = (
D84DAD5A2B1742C1003CF120 /* SentryTestUtilsDynamic.framework in Embed Frameworks */,
D85153012CA2B5F60070F669 /* SentrySwiftUI.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1909,7 +1899,6 @@
D8511F722BAC8F750015E6FD /* Sentry.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Sentry.modulemap; sourceTree = "<group>"; };
D851527E2C9971020070F669 /* SentryStringUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryStringUtils.h; sourceTree = "<group>"; };
D85152822C997A1F0070F669 /* SentryStringUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryStringUtils.swift; sourceTree = "<group>"; };
D851530B2CA2B7A30070F669 /* SentryRedactModifierTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRedactModifierTests.swift; sourceTree = "<group>"; };
D85596F1280580F10041FF8B /* SentryScreenshotIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryScreenshotIntegration.m; sourceTree = "<group>"; };
D855AD61286ED6A4002573E1 /* SentryCrashTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryCrashTests.m; sourceTree = "<group>"; };
D855B3E727D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCoreDataTrackingIntegrationTest.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2019,6 +2008,7 @@
D8F016B52B962548007B9AFB /* StringExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = "<group>"; };
D8F01DE42A126B62008F4996 /* HybridPod.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = HybridPod.podspec; sourceTree = "<group>"; };
D8F01DE52A126BF5008F4996 /* HybridTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTest.swift; sourceTree = "<group>"; };
D8F0F3B62D005AFB00826CE3 /* TracingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingView.swift; sourceTree = "<group>"; };
D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelper.swift; sourceTree = "<group>"; };
D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelperTests.swift; sourceTree = "<group>"; };
D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIRedactBuilderTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2050,7 +2040,6 @@
8431F01C29B2854200D8DC56 /* libSentryTestUtils.a in Frameworks */,
D84DAD592B1742C1003CF120 /* SentryTestUtilsDynamic.framework in Frameworks */,
63AA766A1EB8CB2F00D153DE /* Sentry.framework in Frameworks */,
D85153002CA2B5F60070F669 /* SentrySwiftUI.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2546,7 +2535,6 @@
7BF536D224BEF240004FA6A2 /* TestUtils */,
D81FDF0F280E9FEC0045E0E4 /* Tools */,
7B6C5ED4264E62B60010D138 /* Transaction */,
D851530A2CA2B7960070F669 /* SwiftUI */,
);
path = SentryTests;
sourceTree = "<group>";
Expand Down Expand Up @@ -3690,6 +3678,7 @@
D8199DB529376ECC0074249E /* SentrySwiftUI.h */,
D88D25E92B8E0BAC0073C3D5 /* module.modulemap */,
D8199DB629376ECC0074249E /* SentryTracedView.swift */,
D8F0F3B62D005AFB00826CE3 /* TracingView.swift */,
D8A65B5C2C98656000974B74 /* SentryReplayView.swift */,
);
path = SentrySwiftUI;
Expand Down Expand Up @@ -3734,14 +3723,6 @@
path = SentryTestUtilsDynamic;
sourceTree = "<group>";
};
D851530A2CA2B7960070F669 /* SwiftUI */ = {
isa = PBXGroup;
children = (
D851530B2CA2B7A30070F669 /* SentryRedactModifierTests.swift */,
);
path = SwiftUI;
sourceTree = "<group>";
};
D85596EF280580BE0041FF8B /* Screenshot */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4346,7 +4327,6 @@
dependencies = (
63AA766C1EB8CB2F00D153DE /* PBXTargetDependency */,
D84DAD5C2B1742C1003CF120 /* PBXTargetDependency */,
D85153032CA2B5F60070F669 /* PBXTargetDependency */,
);
name = SentryTests;
packageProductDependencies = (
Expand Down Expand Up @@ -5046,7 +5026,6 @@
D8AE48C12C57B1550092A2A6 /* SentryLevelTests.swift in Sources */,
63FE721820DA66EC00CDBAE8 /* TestThread.m in Sources */,
7B4D308A26FC616B00C94DE9 /* SentryHttpTransportTests.swift in Sources */,
D851530C2CA2B7B00070F669 /* SentryRedactModifierTests.swift in Sources */,
7B4E23B6251A07BD00060D68 /* SentryDispatchQueueWrapperTests.swift in Sources */,
63FE720720DA66EC00CDBAE8 /* SentryCrashReportFilter_Tests.m in Sources */,
8F73BC312B02B87E00C3CEF4 /* SentryInstallationTests.swift in Sources */,
Expand Down Expand Up @@ -5173,6 +5152,7 @@
files = (
D8199DC129376EEC0074249E /* SentryTracedView.swift in Sources */,
D8199DBF29376EE20074249E /* SentryInternal.m in Sources */,
D8F0F3B72D005B0400826CE3 /* TracingView.swift in Sources */,
D8A65B5D2C98656800974B74 /* SentryReplayView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -5213,11 +5193,6 @@
target = D84DAD4C2B17428D003CF120 /* SentryTestUtilsDynamic */;
targetProxy = D84DAD5B2B1742C1003CF120 /* PBXContainerItemProxy */;
};
D85153032CA2B5F60070F669 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D8199DA929376E9B0074249E /* SentrySwiftUI */;
targetProxy = D85153022CA2B5F60070F669 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
Expand Down
2 changes: 1 addition & 1 deletion SentryTestUtils/ClearTestState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TestCleanup: NSObject {

setenv("ActivePrewarm", "0", 1)
SentryAppStartTracker.load()
SentryUIViewControllerPerformanceTracker.shared.enableWaitForFullDisplay = false
SentryUIViewControllerPerformanceTracker.shared.alwaysWaitForFullDisplay = false
SentryDependencyContainer.sharedInstance().swizzleWrapper.removeAllCallbacks()
SentryDependencyContainer.sharedInstance().fileManager.clearDiskState()

Expand Down
6 changes: 1 addition & 5 deletions Sources/Sentry/SentryHub.m
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,7 @@ - (BOOL)eventContainsOnlyHandledErrors:(NSDictionary *)eventDictionary
- (void)reportFullyDisplayed
{
#if SENTRY_HAS_UIKIT
if (_client.options.enableTimeToFullDisplayTracing) {
[SentryUIViewControllerPerformanceTracker.shared reportFullyDisplayed];
} else {
SENTRY_LOG_DEBUG(@"The options `enableTimeToFullDisplay` is disabled.");
}
[SentryUIViewControllerPerformanceTracker.shared reportFullyDisplayed];
#endif // SENTRY_HAS_UIKIT
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryPerformanceTrackingIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options
binaryImageCache:[SentryDependencyContainer.sharedInstance binaryImageCache]];

[self.swizzling start];
SentryUIViewControllerPerformanceTracker.shared.enableWaitForFullDisplay
SentryUIViewControllerPerformanceTracker.shared.alwaysWaitForFullDisplay
= options.enableTimeToFullDisplayTracing;

return YES;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
[SentryDependencyContainer.sharedInstance.dispatchQueueWrapper dispatchAsyncWithBlock:^{
BOOL shouldStopAndTransmitLaunchProfile = options.profilesSampleRate != nil;
# if SENTRY_HAS_UIKIT
if (SentryUIViewControllerPerformanceTracker.shared.enableWaitForFullDisplay) {
if (SentryUIViewControllerPerformanceTracker.shared.alwaysWaitForFullDisplay) {
shouldStopAndTransmitLaunchProfile = NO;
}
# endif // SENTRY_HAS_UIKIT
Expand Down
28 changes: 17 additions & 11 deletions Sources/Sentry/SentryTimeToDisplayTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ @implementation SentryTimeToDisplayTracker {
BOOL _waitForFullDisplay;
BOOL _initialDisplayReported;
BOOL _fullyDisplayedReported;
NSString *_controllerName;
NSString *_name;
}

- (instancetype)initForController:(UIViewController *)controller
waitForFullDisplay:(BOOL)waitForFullDisplay
dispatchQueueWrapper:(SentryDispatchQueueWrapper *)dispatchQueueWrapper
- (instancetype)initWithName:(NSString *)name
waitForFullDisplay:(BOOL)waitForFullDisplay
dispatchQueueWrapper:(SentryDispatchQueueWrapper *)dispatchQueueWrapper
{
if (self = [super init]) {
_controllerName = [SwiftDescriptor getObjectClassName:controller];
_name = name;
_waitForFullDisplay = waitForFullDisplay;
_dispatchQueueWrapper = dispatchQueueWrapper;
_initialDisplayReported = NO;
Expand All @@ -53,6 +53,13 @@ - (instancetype)initForController:(UIViewController *)controller
return self;
}

- (instancetype)initWithName:(NSString *)name waitForFullDisplay:(BOOL)waitForFullDisplay
{
return [self initWithName:name
waitForFullDisplay:waitForFullDisplay
dispatchQueueWrapper:SentryDependencyContainer.sharedInstance.dispatchQueueWrapper];
}

- (BOOL)startForTracer:(SentryTracer *)tracer
{
if (SentryDependencyContainer.sharedInstance.framesTracker.isRunning == NO) {
Expand All @@ -62,17 +69,16 @@ - (BOOL)startForTracer:(SentryTracer *)tracer
}

SENTRY_LOG_DEBUG(@"Starting initial display span");
self.initialDisplaySpan = [tracer
startChildWithOperation:SentrySpanOperationUILoadInitialDisplay
description:[NSString stringWithFormat:@"%@ initial display", _controllerName]];
self.initialDisplaySpan =
[tracer startChildWithOperation:SentrySpanOperationUILoadInitialDisplay
description:[NSString stringWithFormat:@"%@ initial display", _name]];
self.initialDisplaySpan.origin = SentryTraceOriginAutoUITimeToDisplay;

if (self.waitForFullDisplay) {
SENTRY_LOG_DEBUG(@"Starting full display span");
self.fullDisplaySpan =
[tracer startChildWithOperation:SentrySpanOperationUILoadFullDisplay
description:[NSString stringWithFormat:@"%@ full display",
_controllerName]];
description:[NSString stringWithFormat:@"%@ full display", _name]];
self.fullDisplaySpan.origin = SentryTraceOriginManualUITimeToDisplay;

// By concept TTID and TTFD spans should have the same beginning,
Expand Down Expand Up @@ -146,7 +152,7 @@ - (void)finishSpansIfNotFinished
if (self.fullDisplaySpan.isFinished == NO) {
SENTRY_LOG_WARN(@"You didn't call SentrySDK.reportFullyDisplayed() for UIViewController: "
@"%@. Finishing full display span with status: %@.",
_controllerName, nameForSentrySpanStatus(kSentrySpanStatusDeadlineExceeded));
_name, nameForSentrySpanStatus(kSentrySpanStatusDeadlineExceeded));

[self.fullDisplaySpan finishWithStatus:kSentrySpanStatusDeadlineExceeded];
}
Expand Down
Loading

0 comments on commit 895b829

Please sign in to comment.