From 404ab2acad934b9ef97555a73012f364a1c7a8e3 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 8 Apr 2025 13:55:44 +0300 Subject: [PATCH 1/9] Add engine version key notice for github package --- docs/platforms/unreal/index.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/platforms/unreal/index.mdx b/docs/platforms/unreal/index.mdx index ce83430ea78eb9..ffc5939cf291df 100644 --- a/docs/platforms/unreal/index.mdx +++ b/docs/platforms/unreal/index.mdx @@ -75,6 +75,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). From bf3989149dceeeb4c18a8b85c82d1cb6540f6f9b Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 8 Apr 2025 14:09:37 +0300 Subject: [PATCH 2/9] Add notice about hooks invocation during GC --- docs/platforms/unreal/configuration/options.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index 9a57714c0c9feb..bc62825b7bbcbc 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -93,6 +93,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. From 74143e80b9c7e028d658b4b4f6e0fdc785face78 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 8 Apr 2025 14:27:36 +0300 Subject: [PATCH 3/9] Add beforeBreadcrumb hook description --- .../unreal/configuration/options.mdx | 13 ++++++++++ .../enriching-events/breadcrumbs/index.mdx | 26 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index bc62825b7bbcbc..911ce0d30746a7 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -103,6 +103,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 9ffe4d3d05fc01..fd3c04bbb90b36 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; + } +}; +``` From 500133206b7ae60f73b557cf83c8801f33395473 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 8 Apr 2025 14:33:01 +0300 Subject: [PATCH 4/9] Add fast-fail crash capturing to package comp --- docs/platforms/unreal/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/platforms/unreal/index.mdx b/docs/platforms/unreal/index.mdx index ffc5939cf291df..705793ad71ce62 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 From 2368328c5f82526fb4fe65059fd2db9ae9845253 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 8 Apr 2025 14:47:51 +0300 Subject: [PATCH 5/9] Add game log attachment option --- docs/platforms/unreal/configuration/options.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index 911ce0d30746a7..83c9dceb37c0e4 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -89,6 +89,20 @@ The support for screenshot attachment on crash events is limited to Windows and + + +When enabled, game log filr is automatically attached to all events captured if current build configuration allows logging. + +This option is turned off by default. + + + +Game log attachments for crash events are not supported on macOS and iOS. + + + + + ## Hooks These options can be used to hook the SDK in various ways to customize the reporting of events. From f1769e2b20a3a5b83d06e269ea7c33b3ba495752 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Tue, 22 Apr 2025 09:15:51 +0300 Subject: [PATCH 6/9] Update options.mdx --- docs/platforms/unreal/configuration/options.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index 83c9dceb37c0e4..dba8b3c250a831 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -91,7 +91,7 @@ The support for screenshot attachment on crash events is limited to Windows and -When enabled, game log filr is automatically attached to all events captured if current build configuration allows logging. +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. From a51e87cece9b9115f9ab308755314c17eb9c2fe6 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 25 Apr 2025 11:53:30 +0300 Subject: [PATCH 7/9] Add GPU crash dump attachment option --- docs/platforms/unreal/configuration/options.mdx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index dba8b3c250a831..668bd3c494c2f1 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -95,9 +95,23 @@ When enabled, game log file is automatically attached to all events captured if 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. + + + -Game log attachments for crash events are not supported on macOS and iOS. +On Windows, capturing GPU crashes requires [modifying the Unreal Engine source code](https://github.com/EpicGames/UnrealEngine/pull/12648). From 4af167033eb5df1483bff4aa361a3509aef31578 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 25 Apr 2025 11:58:10 +0300 Subject: [PATCH 8/9] Update screenshot attachment option limitation for Android --- docs/platforms/unreal/configuration/options.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/unreal/configuration/options.mdx b/docs/platforms/unreal/configuration/options.mdx index 668bd3c494c2f1..ed85705e271914 100644 --- a/docs/platforms/unreal/configuration/options.mdx +++ b/docs/platforms/unreal/configuration/options.mdx @@ -83,7 +83,7 @@ Learn more about enriching events with screenshots in our