Skip to content

Commit 5ccf3a3

Browse files
flutter: update flutter web release health information (#14041)
Add additional information --------- Co-authored-by: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com>
1 parent 23eae21 commit 5ccf3a3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

platform-includes/configuration/auto-session-tracking/dart.flutter.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
By default, the session is terminated once the application is in the background for more than `30 seconds`. You can change this default by setting the `autoSessionTrackingInterval` option to a `Duration` of your choosing.
44

55
```dart {2}
6-
SentryFlutter.init((options) {
6+
await SentryFlutter.init((options) {
77
options.autoSessionTrackingInterval = const Duration(seconds: 60)
88
});
99
```
@@ -16,16 +16,22 @@ Requires SDK version `9.0.0` or higher.
1616

1717
</Alert>
1818

19-
On web you're required to use the `SentryNavigatorObserver` since sessions are tied to navigation events.
19+
On web it's required to use the `SentryNavigatorObserver` since sessions are tied to navigation events, and for your navigation routes to have names, for example using `RouteSettings`.
2020
Read more [here](/platforms/dart/guides/flutter/integrations/routing-instrumentation/#1-add-sentrynavigationobserver) on how to add the `SentryNavigatorObserver` to your app.
21-
If the `SentryNavigatorObserver` is not used in your app, sessions will not be tracked for web.
21+
22+
<Alert>
23+
24+
If you don't use the `SentryNavigatorObserver` then sessions will not be tracked in your application.
25+
Once you have set up the `SentryNavigatorObserver` make sure every route has a unique name otherwise the release health could be inconsistent and inaccurate.
26+
27+
</Alert>
2228

2329
#### Disable Auto Session Tracking
2430

2531
If you'd like to opt out of capturing sessions, set the `enableAutoSessionTracking` option to `false`. If you disable this feature, release health will not be available.
2632

2733
```dart {2}
28-
SentryFlutter.init((options) {
34+
await SentryFlutter.init((options) {
2935
options.enableAutoSessionTracking = false;
3036
});
3137
```

0 commit comments

Comments
 (0)