diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index 3f08639519365..1bb053f6296bf 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -67,6 +67,13 @@ Grouping in Sentry is different for events with stack traces and without. As a r + + +Takes a screenshot of the application when an error happens and includes it as an attachment. +Learn more about enriching events with screenshots in our Screenshots documentation. + + + ## Hooks These options can be used to hook the SDK in various ways to customize the reporting of events. diff --git a/docs/platforms/unreal/enriching-events/screenshots/img/screenshot-list-example.png b/docs/platforms/unreal/enriching-events/screenshots/img/screenshot-list-example.png new file mode 100644 index 0000000000000..39c803c4dd822 Binary files /dev/null and b/docs/platforms/unreal/enriching-events/screenshots/img/screenshot-list-example.png differ diff --git a/docs/platforms/unreal/enriching-events/screenshots/index.mdx b/docs/platforms/unreal/enriching-events/screenshots/index.mdx new file mode 100644 index 0000000000000..d6b80300d816a --- /dev/null +++ b/docs/platforms/unreal/enriching-events/screenshots/index.mdx @@ -0,0 +1,20 @@ +--- +title: "Screenshots" +description: "Learn more about how to set up Sentry to take screenshots when an error occurs. The screenshot will be paired with the original event, giving you additional insight into issues." +--- + +Sentry makes it possible to automatically take a screenshot and include it as an attachment when a user experiences an error, an exception or a crash. + +This feature is only available for SDKs with a user interface, like the ones for mobile and desktop applications. It's also limited by whether taking a screenshot is possible or not. For example, in some environments, like native iOS, taking a screenshot requires the UI thread, which often isn't available in the event of a crash. Another example where a screenshot might not be available is when the event happens before the screen starts to load. So inherently, this feature is a best effort solution. + +## Enabling Screenshots + +Because screenshots may contain PII, they are an opt-in feature. You can enable screenshots as shown below: + + + +## Viewing Screenshots + +Once you've clicked on the event ID of a specific issue, you'll be able to see an overview of all the attachments as well as associated events in the "Attachments" tab. + +![Screenshots List Example](./img/screenshot-list-example.png) diff --git a/docs/product/issues/issue-details/index.mdx b/docs/product/issues/issue-details/index.mdx index 989c75e00ce96..21f6be438d5a8 100644 --- a/docs/product/issues/issue-details/index.mdx +++ b/docs/product/issues/issue-details/index.mdx @@ -131,6 +131,7 @@ Sentry provides the ability to take a screenshot and include it as an attachment - [JavaScript Electron](/platforms/javascript/guides/electron/enriching-events/screenshots/) - [React Native](/platforms/react-native/enriching-events/screenshots/) - [Unity](/platforms/unity/enriching-events/screenshots/) +- [Unreal Engine](/platforms/unreal/enriching-events/screenshots/) ## Contexts diff --git a/platform-includes/enriching-events/attach-screenshots/img/attach-screenshot-unreal-editor.png b/platform-includes/enriching-events/attach-screenshots/img/attach-screenshot-unreal-editor.png new file mode 100644 index 0000000000000..eafb3bfec92d7 Binary files /dev/null and b/platform-includes/enriching-events/attach-screenshots/img/attach-screenshot-unreal-editor.png differ diff --git a/platform-includes/enriching-events/attach-screenshots/unreal.mdx b/platform-includes/enriching-events/attach-screenshots/unreal.mdx new file mode 100644 index 0000000000000..708c1200fd050 --- /dev/null +++ b/platform-includes/enriching-events/attach-screenshots/unreal.mdx @@ -0,0 +1,29 @@ +Using the editor menu in **Project Settings > Plugins > Sentry**: + +![Options Screenshot Configuration](./img/attach-screenshot-unreal-editor.png) + +Or, like so, if you're [configuring things programatically](/platforms/unreal/configuration/options/): + +```cpp +USentrySettings* Settings = FSentryModule::Get().GetSettings(); +Settings->AttachScreenshot = true; +``` + + + +Currently, this feature is supported for Windows and Linux only. + + + +## Screenshot Capture Mechanism + +Since the Unreal Engine SDK consists of multiple SDKs, the specific mechanism with which a screenshot is captured will vary depending on where the error originated. + +- On Windows/Linux, errors from within your game will be captured using the Unreal Engine API. This means that screenshots will only contain what's visible within your game. Any overlays on top of your game won't be visible. +- On Apple/Android, screenshots will be captured using platform APIs. If you're using a native plugin to display an overlay and an error occurs, the SDK will try to capture a screenshot that contains the overlay. + + + +**Screenshots may contain PII.** For example, if your game has a registration form and an error occurs while the form is being displayed. + +