-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Unreal Engine plugin docs update #13288
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
Changes from 5 commits
404ab2a
bf39891
74143e8
5001332
2368328
f1769e2
a51e87c
4af1670
b63acb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -89,10 +89,26 @@ The support for screenshot attachment on crash events is limited to Windows and | |||||
|
|
||||||
| </ConfigKey> | ||||||
|
|
||||||
| <ConfigKey name="attach-game-log"> | ||||||
|
|
||||||
| 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. | ||||||
|
|
||||||
| <Alert> | ||||||
|
|
||||||
| Game log attachments for crash events are not supported on macOS and iOS. | ||||||
|
|
||||||
| </Alert> | ||||||
|
|
||||||
| </ConfigKey> | ||||||
|
|
||||||
| ## Hooks | ||||||
|
|
||||||
| 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| <ConfigKey name="before-send"> | ||||||
|
|
||||||
| 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 +117,19 @@ By the time <PlatformIdentifier name="before-send" /> is executed, all scope dat | |||||
|
|
||||||
| </ConfigKey> | ||||||
|
|
||||||
| <ConfigKey name="before-breadcrumb"> | ||||||
|
|
||||||
| 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. | ||||||
|
|
||||||
| <Alert> | ||||||
|
|
||||||
| Currently, hints are supported only on Android. | ||||||
|
|
||||||
| </Alert> | ||||||
|
|
||||||
| </ConfigKey> | ||||||
|
|
||||||
| ## Tracing Options | ||||||
|
|
||||||
| <ConfigKey name="traces-sample-rate"> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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**. | ||||||||||
|
|
||||||||||
|  | ||||||||||
|
|
||||||||||
| ## Customize Breadcrumbs | ||||||||||
|
|
||||||||||
| SDKs allow you to customize breadcrumbs through the <PlatformIdentifier name="before-breadcrumb" /> 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) | ||||||||||
| { | ||||||||||
|
Comment on lines
+54
to
+55
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
They should have the same indentation, right? |
||||||||||
| if (Breadcrumb->GetCategory() == "Spammy.Logger") | ||||||||||
| { | ||||||||||
| // Discard breadcrumb | ||||||||||
| return nullptr; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| return Breadcrumb; | ||||||||||
| } | ||||||||||
| }; | ||||||||||
| ``` | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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 | |||||
|
|
||||||
| </Alert> | ||||||
|
|
||||||
| <Alert> | ||||||
|
|
||||||
| 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I might be reading that wrong tho. |
||||||
|
|
||||||
| </Alert> | ||||||
|
|
||||||
| ### 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). | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.