Skip to content

feat(flutter): Default standalone app start tracing - #3981

Merged
buenaflor merged 3 commits into
v10-branchfrom
ref/standalone-app-start-default
Aug 31, 2026
Merged

buenaflor merged 3 commits into
v10-branchfrom
ref/standalone-app-start-default

Conversation

@buenaflor

@buenaflor buenaflor commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Make standalone app.start the only automatic app-start path on Android and iOS.

  • Remove enableStandaloneAppStartTracing
  • Delete ui.load-attached app start (NativeAppStartIntegration and handlers)
  • Keep GenericAppStartIntegration for 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.dart in packages/flutter

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec
  • No breaking changes

🔮 Next steps

Changelog Entry

enableStandaloneAppStartTracing is removed. App start is always a standalone app.start root on Android and iOS when tracing is enabled. The legacy ui.load-attached app start path is gone.

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>
@github-actions

github-actions Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Features

Flutter

  • enableStandaloneAppStartTracing is removed. App start is always a standalone app.start root on Android and iOS when tracing is enabled. The legacy ui.load-attached app start path is gone. by buenaflor in #3981
  • enableStandaloneAppStartTracing is removed. App start is always a standalone app.start root on Android and iOS when tracing is enabled. The legacy ui.load-attached app start path is gone. by buenaflor in #3981

Other

  • (replay) Mask SensitiveContent by default by buenaflor in #3973

Fixes

  • Sampling now runs after beforeSend instead of before it, so ignoreErrors, ignored exception types, event processors and beforeSend all take precedence over the sampleRate decision. An event dropped by beforeSend is now reported as a before_send discard rather than a sample_rate one, and beforeSend now runs for events that are later sampled out. (#3855) by buenaflor in #3955
  • (http) Align HTTP client error type and value by buenaflor in #3934

Internal Changes

Flutter

  • Migrate the Android plugin to Flutter's built-in Kotlin. sentry_flutter no longer applies the Kotlin Gradle Plugin itself, which silences Flutter 3.44's warning about plugins applying KGP and unblocks apps moving to AGP 9. by buenaflor in #3961
  • Made with Cursor by buenaflor in #3961

🤖 This preview updates automatically when you update the PR.

@buenaflor buenaflor changed the title ref(flutter)!: Default standalone app start tracing ref(flutter): Default standalone app start tracing Aug 24, 2026
@codecov

codecov Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v10-branch@b2f8bd2). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
sentry_firebase_remote_config 100.00% <ø> (?)
sentry_flutter 92.71% <ø> (?)
sentry_supabase 97.48% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@buenaflor
buenaflor marked this pull request as ready for review August 31, 2026 11:56
@buenaflor
buenaflor requested a review from denrase as a code owner August 31, 2026 11:56
Copilot AI lite review requested due to automatic review settings August 31, 2026 11:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 enableStandaloneAppStartTracing and made standalone app start the default on Android/iOS.
  • Deleted the ui.load_attached native app-start integration/handlers (and their tests).
  • Kept/rewired GenericAppStartIntegration for 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.

@buenaflor buenaflor changed the title ref(flutter): Default standalone app start tracing feat(flutter): Default standalone app start tracing Aug 31, 2026
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 denrase left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@buenaflor

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants