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
Copy file name to clipboardExpand all lines: docs/platforms/flutter/session-replay/index.mdx
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ By default, our Session Replay SDK masks all text content, images, and user inpu
19
19
20
20
## Pre-requisites
21
21
22
-
Make sure your Sentry Flutter SDK version is at least 8.9.0, which is required for Session Replay.
22
+
Make sure your Sentry Flutter SDK version is at least 8.9.0, which is required for Session Replay.
23
23
You can update your `pubspec.yaml` to the matching version:
24
24
25
25
```yaml
@@ -59,12 +59,26 @@ Sampling allows you to control how much of your website's traffic will result in
59
59
up to a minute of events prior to the error and continue recording until the session
60
60
ends.
61
61
62
-
Sampling starts as soon as a session begins. The <PlatformIdentifiername="replays-session-sample-rate" /> is then evaluated. If the session is sampled, replay recording will start immediately. If not, <PlatformIdentifiername="replays-on-error-sample-rate" /> will be evaluated. If the session is sampled at this point, the replay will be buffered and will only be uploaded to Sentry if an error occurs.
62
+
Sampling starts as soon as a session begins. The <PlatformIdentifiername="replays-session-sample-rate" /> is then evaluated. If the session is sampled, replay recording will start immediately. If not, <PlatformIdentifiername="replays-on-error-sample-rate" /> will be evaluated. If the session is sampled at this point, the replay will be buffered and will only be uploaded to Sentry if an error occurs.
63
63
64
64
## Privacy
65
65
66
-
The SDK is recording and aggressively redacting (masking) all text and images, according to the configuration in `options.experimental.replay`.
67
-
You can tune this and add custom masking rules to fit your needs. For example, you can explicitly mask or unmask widgets by type,
66
+
The SDK is recording and aggressively redacting (masking) all `Text`, `EditableText`, and `Image` widgets.
67
+
Masking in the Sentry Flutter SDK is based on Widget *types*, e.g. `Image`, not the string representation of the type (i.e. we check whether
68
+
a `widgetInstance` should be masked by checking `if (widgetInstance is Image)` instead of `if (widgetInstance.runtimeType == 'Image')`).
69
+
This means we can ensure masking works regardless of obfuscation in release builds and also works for subclasses.
70
+
However, it also means we can only automatically mask widgets that are part of the Flutter SDK itself.
71
+
72
+
<Alertlevel="warning">
73
+
We cannot mask widgets defined in various 3rd-party packages (because the type is not known in the Sentry Flutter SDK),
74
+
even though many should be masked.
75
+
76
+
Therefore, you need to consider the widgets your application uses and ensure they're masked correctly with custom masking rules.
77
+
Examples of widgets that usually should be masked include (but are not limited to): VideoPlayer, WebView, Chart, etc.
78
+
</Alert>
79
+
80
+
You can tune this and add custom masking rules to fit your needs by adjusting the configuration in `options.experimental.replay`.
81
+
For example, you can explicitly mask or unmask widgets by type,
68
82
or you can even have a callback to decide whether a specific widget instance should be masked:
0 commit comments