diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index 9a57714c0c9fe..995ed5715f25f 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -83,7 +83,35 @@ Learn more about enriching events with screenshots in our + +When enabled, game log file is automatically attached to all events captured if the current build configuration allows logging. + +This option is turned off by default. + + + + + +When enabled, [Nsight Aftermath](https://developer.nvidia.com/nsight-aftermath) mini-dump file is automatically attached to GPU crash events captured. + +This option is turned on by default. + + + +This feature is currently supported only for Nvidia GPUs. + + + + + +On Windows, capturing GPU crashes requires [modifying the Unreal Engine source code](https://github.com/getsentry/sentry-unreal/issues/673). @@ -93,6 +121,8 @@ The support for screenshot attachment on crash events is limited to Windows and These options can be used to hook the SDK in various ways to customize the reporting of events. +The callbacks you set as hooks will be called on the thread where the event happened. If the event occurs on a non-game thread during garbage collection the callback will not be invoked. + This function is called with an SDK-specific message or error event object, and can return a modified event object, or `null` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending. @@ -101,6 +131,19 @@ By the time is executed, all scope dat + + +This function is called with an SDK-specific breadcrumb object before the breadcrumb is added to the scope. When nothing is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object. +The callback typically gets a second argument (called a "hint") which contains the original object from which the breadcrumb was created to further customize what the breadcrumb should look like. + + + +Currently, hints are supported only on Android. + + + + + ## Tracing Options diff --git a/docs/platforms/unreal/enriching-events/breadcrumbs/index.mdx b/docs/platforms/unreal/enriching-events/breadcrumbs/index.mdx index 9ffe4d3d05fc0..fd3c04bbb90b3 100644 --- a/docs/platforms/unreal/enriching-events/breadcrumbs/index.mdx +++ b/docs/platforms/unreal/enriching-events/breadcrumbs/index.mdx @@ -37,3 +37,29 @@ The same result can be achieved by calling corresponding function in blueprint: The Unreal Engine SDK can capture certain types of breadcrumbs automatically. Those can be enabled using the Sentry configuration window at **Project Settings > Plugins > Sentry**. ![Sentry automatic breadcrumbs](./img/unreal_automatic_breadcrumbs.png) + +## Customize Breadcrumbs + +SDKs allow you to customize breadcrumbs through the hook (the corresponding handler class can be set in the plugin settings). + +This hook is passed an already assembled breadcrumb and, in some SDKs, an optional hint. The function can modify the breadcrumb or decide to discard it entirely by returning `nullptr`: + +```cpp +UCLASS() +class UCustomBeforeBreadcrumbHandler : public USentryBeforeBreadcrumbHandler +{ + GENERATED_BODY() + +public: + virtual USentryBreadcrumb* HandleBeforeBreadcrumb_Implementation(USentryBreadcrumb* Breadcrumb, USentryHint* Hint) + { + if (Breadcrumb->GetCategory() == "Spammy.Logger") + { + // Discard breadcrumb + return nullptr; + } + + return Breadcrumb; + } +}; +``` diff --git a/docs/platforms/unreal/index.mdx b/docs/platforms/unreal/index.mdx index ce83430ea78eb..705793ad71ce6 100644 --- a/docs/platforms/unreal/index.mdx +++ b/docs/platforms/unreal/index.mdx @@ -56,6 +56,7 @@ The table below highlights some key differences between different versions of th | Backend (Windows) | Crashpad | Breakpad | Crashpad | | `on_crash` hook (Windows) | Supported | Not supported | Supported | | Sentry CLI ** | Included | Manual download | Included | +| Fast-fail crash capturing | Supported | Not supported | Supported | Legend: `*`: Recommended version of the SDK @@ -75,6 +76,12 @@ Currently, this method is available only for C++ UE projects. Blueprint projects + + +To avoid warnings during the build for licensee versions of Unreal Engine, the `EngineVersion` key is not set in the `Sentry.uplugin` for the `github` package. + + + ### Installing from Fab Sentry SDK can be downloaded via the [standard installation process](https://dev.epicgames.com/documentation/en-us/unreal-engine/working-with-plugins-in-unreal-engine#installingpluginsfromtheunrealenginemarketplace) from its [Epic Games Fab page](https://www.fab.com/listings/eaa89d9d-8d39-450c-b75f-acee010890a2).