Repository navigation
feat(flutter): Default standalone app start tracing - #3981
Conversation
Remove ui.load-attached app start tracing and the enableStandaloneAppStartTracing option. Standalone app.start is now automatic on Android and iOS when tracing is enabled. Fixes GH-3768 BREAKING CHANGE: enableStandaloneAppStartTracing is removed. App start is always a standalone app.start root on Android and iOS. The legacy ui.load-attached path is gone. Co-Authored-By: Cursor <cursoragent@cursor.com>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. FeaturesFlutter
Other
Fixes
Internal ChangesFlutter
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v10-branch #3981 +/- ##
=============================================
Coverage ? 93.00%
=============================================
Files ? 111
Lines ? 4349
Branches ? 0
=============================================
Hits ? 4045
Misses ? 304
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
🟡 Changes recommended
A couple of small clarity issues remain (notably doc/naming clarity in touched areas) that should be addressed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR makes standalone app.start the only automatic app-start tracing path on Android and iOS, removing the legacy ui.load-attached native app-start flow while keeping a generic TTID/TTFD fallback for web/desktop/macOS.
Changes:
- Removed
enableStandaloneAppStartTracingand made standalone app start the default on Android/iOS. - Deleted the
ui.load_attachednative app-start integration/handlers (and their tests). - Kept/rewired
GenericAppStartIntegrationfor web/desktop/macOS and updated tests/examples accordingly.
File summaries
| File | Description |
|---|---|
| packages/flutter/lib/src/sentry_flutter.dart | Switches default integration wiring to standalone app start on iOS/Android; adds generic app-start integration on web/desktop/macOS. |
| packages/flutter/lib/src/sentry_flutter_options.dart | Removes the standalone toggle and simplifies the platform predicate for standalone app start. |
| packages/flutter/lib/src/integrations/integrations.dart | Stops exporting the removed NativeAppStartIntegration. |
| packages/flutter/lib/src/app_start/ui_load_attached/native_app_start_integration.dart | Removes legacy ui.load-attached native app-start integration. |
| packages/flutter/lib/src/app_start/ui_load_attached/native_app_start_handler.dart | Removes legacy ui.load-attached native handler (static lifecycle). |
| packages/flutter/lib/src/app_start/ui_load_attached/native_app_start_handler_v2.dart | Removes legacy ui.load-attached native handler (stream lifecycle). |
| packages/flutter/lib/src/app_start/standalone/standalone_app_start_integration.dart | Updates skip messaging to reflect platform-support-only gating. |
| packages/flutter/lib/src/app_start/standalone/app_start_vitals.dart | Updates comments to reflect standalone being the only reporting path. |
| packages/flutter/lib/src/app_start/generic_app_start_integration.dart | Adjusts internal imports after moving/standardizing the generic integration location. |
| packages/flutter/lib/src/app_start/app_start_timing.dart | Removes ui.load-attached-specific helpers and updates standalone op docs. |
| packages/flutter/test/sentry_flutter_test.dart | Updates integration expectations to match the new default app-start behavior. |
| packages/flutter/test/app_start/ui_load_attached/native_app_start_integration_test.dart | Deletes tests for removed ui.load-attached integration. |
| packages/flutter/test/app_start/ui_load_attached/native_app_start_handler_test.dart | Deletes tests for removed ui.load-attached handler (static lifecycle). |
| packages/flutter/test/app_start/ui_load_attached/native_app_start_handler_v2_test.dart | Deletes tests for removed ui.load-attached handler (stream lifecycle). |
| packages/flutter/test/app_start/standalone/standalone_app_start_integration_test.dart | Removes option-toggle tests and keeps tracing/platform gating coverage. |
| packages/flutter/test/app_start/standalone/standalone_app_start_handler_test.dart | Removes obsolete option toggle usage in fixture setup. |
| packages/flutter/test/app_start/generic_app_start_integration_test.dart | Updates imports after moving/standardizing generic integration location. |
| packages/flutter/example/lib/main.dart | Removes the deleted option from example configuration. |
| packages/flutter/example/integration_test/platform_integrations_test.dart | Updates imports to the new generic integration path. |
Review details
- Files reviewed: 19/19 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Registration already gates standalone app start to iOS and Android. The getter only restated that, so remove it and the call-time skip. Rename the generic app-start test list now that macOS uses it too. Co-Authored-By: Cursor <cursoragent@cursor.com>
denrase
left a comment
There was a problem hiding this comment.
As this is the only way for to record app start now, we could make the case for removing "Standalone" from the naming, but on the other hand, it does add context to it.
yeah, I think in v11 we can do that |
📜 Description
Make standalone
app.startthe only automatic app-start path on Android and iOS.enableStandaloneAppStartTracingNativeAppStartIntegrationand handlers)GenericAppStartIntegrationfor TTID/TTFD on web, desktop, and macOS💡 Motivation and Context
v10 should report app start as its own root instead of nesting it under the synthetic initial
ui.load.Fixes #3768
💚 How did you test it?
fvm flutter test test/app_start test/sentry_flutter_test.dartinpackages/flutter📝 Checklist
sendDefaultPiiis enabled🔮 Next steps
Changelog Entry
enableStandaloneAppStartTracingis removed. App start is always a standaloneapp.startroot on Android and iOS when tracing is enabled. The legacy ui.load-attached app start path is gone.