Skip to content

Commit d541779

Browse files
committed
update
1 parent dd72b44 commit d541779

File tree

5 files changed

+35
-43
lines changed

5 files changed

+35
-43
lines changed

docs/platforms/dart/configuration/releases.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,14 @@ Setting the release name tags each event with that release name. We recommend th
5757
If you don't tell Sentry about a new release, Sentry will automatically create a release entity in the system the first time it sees an event with that release ID.
5858

5959
After configuring your SDK, you can install a repository integration or manually supply Sentry with your own commit metadata. Read our documentation about [setting up releases](/product/releases/setup/) for further information about integrations, associating commits, and telling Sentry when deploying releases.
60+
61+
## Release Health
62+
63+
<Note>
64+
65+
Looking for Flutter release health? [See the Flutter documentation](/platforms/flutter/configuration/releases/#release-health).
66+
67+
</Note>
68+
69+
Monitoring release health is currently not supported for pure Dart applications.
70+

docs/platforms/flutter/configuration/options.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ This option can be overridden using <PlatformIdentifier name="in-app-include" />
151151
<ConfigKey name="attach-screenshot">
152152

153153
Takes a screenshot of the application when an error happens and includes it as an attachment.
154+
Enable this feature by setting <PlatformIdentifier name="attach-screenshot" /> to `true` and wrapping your root widget with `SentryWidget(child: MyApp())`.
154155
Learn more about enriching events with screenshots in our <PlatformLink to="/enriching-events/screenshots/">Screenshots documentation</PlatformLink>.
155156

156157
</ConfigKey>

docs/platforms/flutter/configuration/releases.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ After configuring your SDK, you can install a repository integration or manually
6262

6363
Monitor the [health of releases](/product/releases/health/) by observing user adoption, usage of the application, percentage of [crashes](/product/releases/health/#crash), and [session data](/product/releases/health/#session). Release health will provide insight into the impact of crashes and bugs as it relates to user experience, and reveal trends with each new issue through the [Release Details](/product/releases/release-details/) graphs and filters.
6464

65+
In order to monitor release health, the SDK sends session data.
66+
6567
<Note>
6668

67-
Release health is only available for Android and iOS and macOS.
69+
Release health in Flutter is only available for Android and iOS and macOS.
6870

6971
</Note>
7072

71-
In order to monitor release health, the SDK sends session data.
72-
7373
### Sessions
7474

7575
A session represents the interaction between the user and the application. Sessions contain a timestamp, a status (if the session was OK or if it crashed), and are always linked to a release. Most Sentry SDKs can manage sessions automatically.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
To benefit from the health data, you must use at least version 4.0.0 of the Flutter SDK.
22

3-
### Session Timeout
3+
#### Session Timeout
44

5-
By default, the session is terminated once the application is in the background for more than `30 seconds`. You can change the default timeout with the option `autoSessionTrackingInterval` to a Duration of your choosing.
5+
By default, the session is terminated once the application is in the background for more than `30 seconds`. You can change the default timeout with the option `autoSessionTrackingInterval` to a `Duration` of your choosing.
66

77
```dart
88
SentryFlutter.init((options) {
@@ -11,7 +11,7 @@ SentryFlutter.init((options) {
1111
}, appRunner: () => runApp(MyApp()));
1212
```
1313

14-
### Disable Auto Session Tracking
14+
#### Disable Auto Session Tracking
1515

1616
If you'd like to opt out of capturing sessions, set the option `enableAutoSessionTracking` to `false`.
1717

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
```dart
2-
import 'package:flutter/widgets.dart';
3-
import 'package:sentry_flutter/sentry_flutter.dart';
4-
5-
Future<void> main() async {
6-
await SentryFlutter.init(
7-
(options) {
8-
options.dsn = '___PUBLIC_DSN___';
9-
options.attachScreenshot = true;
10-
},
11-
appRunner: () => runApp(
12-
// Wrap your app widget with the [SentryWidget] widget.
13-
SentryWidget(
14-
child: MyApp(),
15-
),
2+
await SentryFlutter.init(
3+
(options) {
4+
// Set the option to true to enable capturing screenshots
5+
options.attachScreenshot = true;
6+
},
7+
appRunner: () => runApp(
8+
// Wrap your app widget with the [SentryWidget] widget.
9+
SentryWidget(
10+
child: MyApp(),
1611
),
17-
);
18-
}
12+
),
13+
);
1914
```
2015

2116
### Filtering Screenshots
@@ -24,25 +19,10 @@ You can filter your screenshots by using the `beforeScreenshot` callback.
2419
It is called before taking a screenshot and if the callback returns `false`, the screenshot will not be attached.
2520

2621
```dart
27-
import 'package:flutter/widgets.dart';
28-
import 'package:sentry_flutter/sentry_flutter.dart';
29-
30-
Future<void> main() async {
31-
await SentryFlutter.init(
32-
(options) {
33-
options.dsn = '___PUBLIC_DSN___';
34-
options.attachScreenshot = true;
35-
options.beforeScreenshot = (event, {hint}) {
36-
// Return false if you don't want to attach the screenshot based on some condition.
37-
return true;
38-
};
39-
},
40-
appRunner: () => runApp(
41-
// Wrap your app widget with the [SentryWidget] widget.
42-
SentryWidget(
43-
child: MyApp(),
44-
),
45-
),
46-
);
47-
}
22+
await SentryFlutter.init((options) {
23+
options.beforeScreenshot = (event, {hint}) {
24+
// Return false if you don't want to attach the screenshot based on some condition.
25+
return true;
26+
};
27+
});
4828
```

0 commit comments

Comments
 (0)