Missing UI Load Spans for View Controllers in Framework Bundles
Platform
iOS
Environment
Develop, Production
Installed
Carthage
Version
8.53.2
Xcode Version
16.4
Did it work on previous versions?
No response
Steps to Reproduce
- Clone this repo https://github.com/serglom21/sentry-ios-bundle-execution
- Run the app on a simulator
- Check Sentry for ui.load spans
Expected Result
UI load spans should be generated for all view controllers regardless of whether they are in the main app bundle or framework bundles
Actual Result
UI load spans are missing for view controllers in framework bundles, making it difficult to track performance metrics for modularized applications or apps using third-party UI frameworks.
Are you willing to submit a PR?
No response
The SentryUIViewControllerSwizzling only swizzles the UIViewControllers being in-app by design, because otherwise the SDK would instrument plenty of UIViewControllers that are just noise for users.
https://github.com/getsentry/sentry-cocoa/blob/7d88965b68a8e0439450ba54ab41844a8ba5bc10/Sources/Sentry/SentryUIViewControllerSwizzling.m#L76-L90
You can change this via the inAppIncludes option https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#in-app-include
I just noticed that we don't mention this anywhere here https://docs.sentry.io/platforms/apple/guides/ios/tracing/instrumentation/automatic-instrumentation/#uiviewcontroller-tracing so we should update the docs.