getsentry / getsentry/sentry-cocoa
UIKit VC spans run into timeout if view never becomes visible
Open
Cocoa
Feature
Spans
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 418
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 106
Description
### Problem Statement
If a UIKit VC is initialized, a span is created to capture the lifecycle of the VC.
For subsequent passes through UI lifecycle events (`viewDidLoad`, `viewWillAppear`, etc.), sub-spans are created.
In cases where the view never becomes visible (i.e. `viewWillAppear` is never invoked), the main span of the VC runs until the end of the set timeout. This creates non-helpful spans.
### Solution Brainstorm
One of the following:
1. Only report VC spans if they pass at least `viewWillAppear`
2. Trim the VC span to the last lifecycle event span
### Are you willing to submit a PR?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.