You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are scenarios for which the OS doesn't call viewWillAppear; see Apple docs. We could call reportInitialDisplay also in subsequent UIViewController methods that the OS calls before rendering the first frame of the UIViewController, such as viewIsAppearing or viewWillLayoutSubView, etc.
Especially when having performanceV2 enabled, this leads to confusion because the initial frame render of the app start differs from the TTID. The app start metric subscribes to the very first frame being rendered
According to the Apple docs, viewWillAppear should be called before the
UIViewController is added to the view hierarchy. There are some edge
cases, though, when this doesn't happen, and we saw customers'
transactions also proofing this. Therefore, we must also report the
initial display here, as the customers' transactions had spans for
viewWillLayoutSubViews.
FixesGH-4383
According to the Apple docs, viewWillAppear should be called before the
UIViewController is added to the view hierarchy. There are some edge
cases, though, when this doesn't happen, and we saw customers'
transactions also proofing this. Therefore, we must also report the
initial display here, as the customers' transactions had spans for
viewWillLayoutSubViews.
FixesGH-4383
Description
When the OS doesn't call
viewWillAppear
the TTID span gets finished when it's tracer finishes:sentry-cocoa/Sources/Sentry/SentryTimeToDisplayTracker.m
Lines 97 to 101 in 8c38fb1
This is because the
reportInitialDisplay
only gets called from theSentryUIViewControllerPerformanceTracker
whenviewWillAppear
gets called:sentry-cocoa/Sources/Sentry/SentryUIViewControllerPerformanceTracker.m
Line 191 in 8c38fb1
There are scenarios for which the OS doesn't call viewWillAppear; see Apple docs. We could call
reportInitialDisplay
also in subsequent UIViewController methods that the OS calls before rendering the first frame of the UIViewController, such asviewIsAppearing
orviewWillLayoutSubView,
etc.Especially when having
performanceV2
enabled, this leads to confusion because the initial frame render of the app start differs from the TTID. The app start metric subscribes to the very first frame being renderedsentry-cocoa/Sources/Sentry/SentryAppStartTracker.m
Lines 68 to 71 in 8c38fb1
Maybe we need to align the initial frame render of the app start time with the TTID when fixing this bug.
The text was updated successfully, but these errors were encountered: