Unreal Engine 4

Installation of a Sentry SDK is not required in order to capture the crashes of your UE4 application or game. Sentry supports the UE4 Crash Reporter.

To integrate your UE4 game or application with Sentry, the following steps are required:

  1. Include the UE4 Crash Reporter to your game or application.
  2. Include Debug information in the crash reports.
  3. Add the Unreal Engine Endpoint to the relevant configuration file.
  4. Upload your games symbols so Sentry can display function names and line numbers.
  5. Optionally enable Event Attachments for your Sentry project.

Below we'll break down each step in detail.

UE4 Crash reporter

The UE4 Crash Reporter is provided out of the box by Epic Games. It is able to collect relevant information about the crash and send it to a service like Sentry to process.

Adding it to your game means that in case a crash happens, the following dialog is displayed to the user:

The UE4 Crash Reporter

Include the UE4 Crash Reporter

You can add the Crash Report Client to your game in your Project Settings.

The simplest way is to search the option: Crash Reporter:

Include UE4 Crash Reporter

The option is located under Project > Packaging menu, then select show advanced followed by checking the box for: Include Crash Reporter.

Debug information

To get the most out of Sentry, crash reports are required to include debug information. In order for Sentry to be able to process the crash report and translate memory addresses to meaningful information like function names, module names and line numbers, the crash itself must include debug information and also, symbols need to be uploaded to Sentry.

Include Debug Information

Include Debug Files

The option is also located under Project > Packaging menu, then select show advanced followed by checking the box for: Include Debug Files.

Configure the Crash Reporter Endpoint

Now that the Crash Reporter and Debug Files are included, UE4 needs to know where to send the crash. For that, we add the Sentry Unreal Engine Endpoint from the Client Keys settings page to game's configuration file. This will include which project within Sentry you want to see the crashes arriving in real time. That's accomplished by configuring the CrashReportClient in the DefaultEngine.ini file.

Edit the file:

project-root\Config\DefaultEngine.ini

Add the configuration section:

DefaultEngine.ini
Copied
[CrashReportClient]
CrashReportClientVersion=1.0
DataRouterUrl="https://o0.ingest.sentry.io/api/0/unreal/examplePublicKey/"

Upload Debug Symbols

To allow Sentry to fully process native crashes and provide you with symbolicated stack traces, you need to upload Debug Information Files (sometimes also referred to as Debug Symbols or just Symbols). We recommend uploading debug information during your build or release process.

For all libraries where you'd like to receive symbolication, you need to provide debug information. This includes dependencies and operating system libraries.

In addition to Debug Information Files, Sentry needs Call Frame Information (CFI) to extract accurate stack traces from minidumps of optimized release builds. CFI is usually part of the executables and not copied to debug symbols. Unless you are uploading Breakpad symbols, be sure to also include the binaries when uploading files to Sentry.

For more information on uploading debug information and their supported formats, see Debug Information Files.

Event Attachments

The files within the crash uploaded to Sentry can be persisted using Event Attachments. Learn more about these in Attachments.

Size Limits

Event ingestion imposes limits on the size of UE4 crash reports. These limits are subject to future change and defined currently as:

  • 20MB for a compressed request
  • 100MB for the full crash report after decompression

Issues With The Crash Reporter

For tips on troubleshooting the UE4 Crash Reporter, check out this thread in Sentry's forum where community members have delved into potential solutions.