-
-
Notifications
You must be signed in to change notification settings - Fork 277
Description
Problem Statement
The documentation at https://docs.sentry.io/platforms/dart/guides/flutter/integrations/routing-instrumentation/ explains how to capture TTFD (Time To Full Display) for widgets that are loaded through navigation (using Navigator.push or GoRouter).
However, it doesn't cover how to capture TTFD for widgets that are NOT part of navigation - for example:
- Widgets that are conditionally rendered within a page
- Dynamically loaded content sections
- Tab views within a screen
- Any other widgets that appear without a route change
Can you provide guidance on whether TTFD tracking is supported for these non-navigation scenarios, and if so, how to implement it?
Solution Brainstorm
Possible solutions could include:
-
Extend SentryDisplayWidget - Allow SentryDisplayWidget to work independently of navigation, so it can be wrapped around any widget that needs TTFD tracking.
-
Manual Span Creation API - Provide a way to manually create TTFD spans for custom scenarios:
final span = Sentry.startTTFDSpan(name: 'Portfolio Tab'); // ... load content ... span.reportFullyDisplayed();
-
Documentation Enhancement - If TTFD is currently only supported for navigation scenarios, clearly document this limitation and explain the reasoning (e.g., tying it to transaction boundaries).
-
Custom Display Tracking - Provide examples of how developers can implement their own TTFD-like tracking for non-navigation widgets using custom spans.
This would be particularly useful for complex apps where significant UI loading happens within a single route.
Are you willing to submit a PR?
None
Metadata
Metadata
Assignees
Projects
Status