You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the application's main route name is `"/"`.
61
91
The instrumentation sets the span `operation` to `navigation` and the span `name` to the provided route name.
62
-
For transactions to be created when navigation changes, you need to provide route names:
92
+
For transactions to be created and breadcrumbs to be added when navigation changes, you need to provide route names:
63
93
64
94
- Flutter routing: use `RouteSettings` and set the name in the constructor.
65
95
- GoRouter: use the `name` parameter to set the route name.
66
96
67
-
```dart {4} {tabTitle: Flutter Routing}
68
-
/// Setting the route name is required
97
+
<Alert>
98
+
99
+
Make sure that you set the route name for all routes.
100
+
If you do not set the route name, the SDK will not instrument performance insights such as [TTID](/platforms/dart/guides/flutter/integrations/routing-instrumentation/#time-to-initial-display) or [TTFD](/platforms/dart/guides/flutter/integrations/routing-instrumentation/#time-to-full-display) or create breadcrumbs for the route.
Time to initial display (TTID) provides insight into how long it takes your Widget to launch and draw their first frame. This is measured by adding a span for navigation to a Widget. The SDK then sets the span operation to `ui.load.initial-display` and the span description to the Widget's route name, followed by initial display (for example, `MyWidget initial display`).
123
+
Time to initial display (TTID) provides insight into how long it takes your Widget to launch and draw their first frame.
124
+
This is measured by adding a span for navigation to a Widget.
125
+
The SDK then sets the span operation to `ui.load.initial-display` and the span description to the Widget's route name, followed by initial display (for example, `MyWidget initial display`).
126
+
127
+
TTID is enabled by default.
102
128
103
129
## Time to Full Display
104
130
105
-
Time to full display (TTFD) provides insight into how long it would take your Widget to launch and load all of its content. This is measured by adding a span for each navigation to a Widget. The SDK then sets the span operation to `ui.load.full-display` and the span description to the Widget's route name, followed by full display (for example, `MyWidget full display`).
131
+
Time to full display (TTFD) provides insight into how long it would take your Widget to launch and load all of its content.
132
+
This is measured by adding a span for each navigation to a Widget.
133
+
The SDK then sets the span operation to `ui.load.full-display` and the span description to the Widget's route name, followed by full display (for example, `MyWidget full display`).
106
134
107
135
TTFD is disabled by default. To enable TTFD measurements, follow these steps:
108
136
109
-
1. Enable the `enableTimeToFullDisplayTracing` option in the SDK configuration:
137
+
### 1. Enable the `enableTimeToFullDisplayTracing` option in the SDK configuration
There are two ways to report when your widget is fully displayed:
151
+
152
+
#### 1. Wrap with `SentryDisplayWidget`
153
+
154
+
Embed your target widget in `SentryDisplayWidget` and call `SentryDisplayWidget.of(context).reportFullyDisplayed()`.
155
+
156
+
#### 2. Call the API directly
157
+
158
+
Retrieve the current display span via `SentryFlutter.currentDisplay()` in `initState()` and call `currentDisplay.reportFullyDisplayed()` — no wrapper needed.
159
+
160
+
161
+
<Alert>
162
+
163
+
**Important for `StatelessWidget`:**
164
+
165
+
If you're navigating to a `StatelessWidget`, you must use the `SentryDisplayWidget` wrapper.
166
+
`SentryDisplayWidget` automatically reports TTFD as soon as the build completes.
167
+
You do not need to call `reportFullyDisplayed()` yourself.
168
+
169
+
</Alert>
170
+
171
+
```dart {5, 13-18} {tabTitle: Wrap with SentryDisplayWidget}
0 commit comments