sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Pre loaded UIViewController transactions might be finished way too late

Open philipphofmann opened this issue 3 years ago • 4 comments

Description

UIViewControllers can be preloaded, meaning calling the lifecycle methods up to viewDidLoad or even further. They can stick around for a while before they actually get fully loaded. This could lead to auto-generated transactions with a way too long duration.

Auto-generated transactions lasting longer than 5 minutes already get discarded with https://github.com/getsentry/sentry-cocoa/pull/1903.

philipphofmann avatar Jun 23 '22 13:06 philipphofmann

Users may even start some view controller before any other view controller but not attached it to the view hierarch, so this could end up in the scope "intercepting" every other new span and never finish, or finish way later.

brustolin avatar Jun 23 '22 14:06 brustolin

One idea, from @brustolin, is to ignore UIViewControllers initialized outside the view hierarchy. We can detect this by checking parentViewController and/or viewParentView.

We could end these UIViewController transactions early or find another point of time to finish them not to discard them.

philipphofmann avatar Jul 06 '22 14:07 philipphofmann

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Jul 28 '22 00:07 github-actions[bot]

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Aug 19 '22 00:08 github-actions[bot]