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
Capturing view hierarchies on Flutter is limited to once every 2 seconds by default to minimize performance impact. While this debounce interval is fixed, you can override individual capture decisions by implementing the `beforeCaptureViewHierarchy` option in your `SentryFlutterOptions`.
33
+
34
+
The `beforeCaptureViewHierarchy` option allows you to customize behavior based on event data so you can decide when to capture view hierarchy and when not to. For example, you can decide to only capture view hierarchy for fatal events:
View hierarchies appear in the "Attachments" tab, where you can view all attachments, as well as associated events. Click the event ID to open the [Issue Details](/product/issues/issue-details) page of that specific event.
Copy file name to clipboardExpand all lines: platform-includes/enriching-events/attach-screenshots/flutter.mdx
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,31 @@ await SentryFlutter.init(
13
13
);
14
14
```
15
15
16
+
### Customize Screenshot Capturing
17
+
18
+
<Note>
19
+
20
+
Requires SDK version `8.11.0` or higher.
21
+
22
+
</Note>
23
+
24
+
Capturing screenshots on Flutter is limited to once every 2 seconds by default to minimize performance impact. While this debounce interval is fixed, you can override individual capture decisions by implementing the `beforeCaptureScreenshot` option in your `SentryFlutterOptions`.
25
+
26
+
The `BeforeCaptureCallback` also allows you to customize the behavior based on event data, so you can decide when to capture a screenshot and when not to. For example, you can decide to only capture screenshots of fatal events:
The masking feature is by default disabled for Screenshots. To enable masking, use the `options.experimental.privacy` parameter.
@@ -26,7 +51,7 @@ The masking feature is by default disabled for Screenshots. To enable masking, u
26
51
27
52
## Filtering Screenshots
28
53
29
-
You can filter your screenshots by using the `beforeScreenshot` callback, which is called before attaching a screenshot to an event. By default, the callback returns `true` which means that all screenshots are attached.
54
+
You can filter your screenshots by using the `beforeCaptureScreenshot` callback, which is called before attaching a screenshot to an event. By default, the callback returns `true` which means that all screenshots are attached.
30
55
31
56
If the callback returns `false`, the screenshot will not be attached.
0 commit comments