Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add screenshot feature description for Unreal Engine #11042

Merged
merged 7 commits into from
Sep 11, 2024
7 changes: 7 additions & 0 deletions docs/platforms/unreal/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ Grouping in Sentry is different for events with stack traces and without. As a r

</ConfigKey>

<ConfigKey name="attach-screenshot">

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 <PlatformLink to="/enriching-events/screenshots/">Screenshots documentation</PlatformLink>.

</ConfigKey>

## Hooks

These options can be used to hook the SDK in various ways to customize the reporting of events.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/platforms/unreal/enriching-events/screenshots/index.mdx
Original file line number Diff line number Diff line change
@@ -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 <PlatformLink to="/enriching-events/attachments/">attachment</PlatformLink> 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 <PlatformLink to="/data-management/sensitive-data/">PII</PlatformLink>, they are an opt-in feature. You can enable screenshots as shown below:

<PlatformContent includePath="enriching-events/attach-screenshots" />

## 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)
1 change: 1 addition & 0 deletions docs/product/issues/issue-details/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions platform-includes/enriching-events/attach-screenshots/unreal.mdx
Original file line number Diff line number Diff line change
@@ -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;
```

<Note>

Currently, this feature is supported for Windows and Linux only.

</Note>

## 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could clarify that it's still limited to the actual game app and not "anything that's an overlay on the screen".


<Note>

**Screenshots may contain PII.** For example, if your game has a registration form and an error occurs while the form is being displayed.

</Note>
Loading