-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Unreal Engine: Add migration guide #14186
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d6d0ef5
Add migration guide
tustanivsky cb357fe
Update sdk configuration
tustanivsky d871afc
Add user feedback migration
tustanivsky 9d04647
Add new section how to configure global scope after ConfigureScope me…
tustanivsky 7e1b853
Add tracing breaking changes
tustanivsky b394bc7
Merge branch 'master' into unreal/migration
tustanivsky 8f88760
Update docs/platforms/unreal/migration/index.mdx
tustanivsky 7a0a6ca
Add scope configuration example
tustanivsky 4e29a73
Add feedback submission example
tustanivsky cceb70b
Add sampling example
tustanivsky 8f23d0a
Fix param
tustanivsky dec90b3
Fix component
tustanivsky f13df5a
Merge branch 'master' into unreal/migration
tustanivsky bb463e0
Merge branch 'master' into unreal/migration
tustanivsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| --- | ||
| title: Migration Guide | ||
| description: "Learn more about migrating to the current version." | ||
| sidebar_order: 8000 | ||
| --- | ||
| <Note> | ||
| We recommend using this guide starting from the version closes to your current version which might require scrolling further down before jumping to the latest guide. | ||
| </Note> | ||
| ## Migrating to 1.0.0 | ||
|
|
||
| ### Breaking changes | ||
|
|
||
| #### Sentry Classes Instantiation | ||
|
|
||
| Sentry class objects created via `NewObject<T>` in C++ or `ConstructObjectFromClass` in Blueprints now require an explicit call to their `Initialize` method (if available) before use. In Blueprints, it's recommended to use the provided Sentry library functions to create these entities as they automatically call `Initialize` and return a fully initialized, ready-to-use object. | ||
|
|
||
| #### Cleanup Public Classes | ||
|
|
||
| We cleaned up our public API by removing a few functions and classes to streamline the SDK and remove ambiguities. The following changes were made: | ||
|
|
||
| - Removed `USentryId` class and replaced its usages with `FString` | ||
| - Removed `USentrySubsystem::ConfigureScope` function | ||
| - Removed `USentryLibrary::StringToBytesArray` function | ||
| - Removed `USentryLibrary::ByteArrayToString` function | ||
| - Removed `USentryLibrary::SaveStringToFile` function | ||
| - Removed `USentryScope::SetEnvironment` function | ||
| - Removed `USentryScope::GetEnvironment` function | ||
| - Removed `USentryScope::SetDist` function | ||
| - Removed `USentryScope::GetDist` function | ||
|
|
||
| #### User feedback | ||
|
|
||
| We have reworked the user feedback feature so now it no longer needs to be associated with a specific event and the only required input is the text message. If you were using this functionality in your project consider updating it accordingly: | ||
|
|
||
| - Replace `USentryUserFeedback` class references with `USentryFeedback` | ||
| - Replace `USentrySubsystem::CaptureUserFeedback` function usages with `USentrySubsystem::CaptureFeedback` | ||
| - Replace `USentryLibrary::CreateSentryUserFeedback` function usages with `USentryLibrary::CreateSentryFeedback` | ||
|
|
||
| ```cpp | ||
| USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>(); | ||
|
|
||
| FString Message = TEXT("Feedback message"); | ||
| FString Name = TEXT("John Doe"); | ||
| FString Email = TEXT("[email protected]"); | ||
| FString EventId = TEXT("c3829f10764848442d813c4124cf44a0"); | ||
|
|
||
| // Submitting user feedback before v1.0.0 | ||
|
|
||
| USentryUserFeedback* Feedback = NewObject<USentryUserFeedback>(); | ||
|
|
||
| Feedback->Initialize(EventId); | ||
|
|
||
| Feedback->SetName(Name); // optional | ||
| Feedback->SetEmail(Email); // optional | ||
| Feedback->SetComment(Message); // optional | ||
|
|
||
| SentrySubsystem->CaptureUserFeedback(Feedback); | ||
|
|
||
| // Submitting user feedback in v1.0.0 | ||
|
|
||
| USentryFeedback* Feedback = NewObject<USentryFeedback>(); | ||
|
|
||
| Feedback->Initialize(Message); | ||
|
|
||
| Feedback->SetName(Name); // optional | ||
| Feedback->SetContactEmail(Email); // optional | ||
| Feedback->SetAssociatedEvent(Feedback); // optional | ||
tustanivsky marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| SentrySubsystem->CaptureFeedback(Feedback); | ||
| ``` | ||
|
|
||
| #### Tracing | ||
|
|
||
| The `USentrySubsystem::StartTransactionWithContextAndOptions` function now takes an `FSentryTransactionOptions` struct instead of a `TMap<FString, FString>`, improving clarity and allowing better extensibility in the future. | ||
|
|
||
| Also, the `USentrySamplingContext` class now utilizes `FSentryVariant` instead of strings for custom sampling context values. | ||
|
|
||
| ```cpp | ||
| USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>(); | ||
|
|
||
| // Starting transaction with context and options before v1.0.0 | ||
|
|
||
| USentryTransactionContext* TransactionContext = ... | ||
|
|
||
| TMap<FString, FString> Options; | ||
| Options.Add("key1", "value1"); | ||
| Options.Add("key2", "value2"); | ||
|
|
||
| SentrySubsystem->StartTransactionWithContextAndOptions(TransactionContext, Options); | ||
|
|
||
| // Starting transaction with context and options in v1.0.0 | ||
|
|
||
| USentryTransactionContext* TransactionContext = ... | ||
|
|
||
| FSentryTransactionOptions Options; | ||
| Options.CustomSamplingContext.Add("key1", FSentryVariant("value1")); | ||
| Options.CustomSamplingContext.Add("key2", FSentryVariant("value2")); | ||
|
|
||
| SentrySubsystem->StartTransactionWithContextAndOptions(TransactionContext, Options); | ||
| ``` | ||
|
|
||
| #### Event ID format (Windows/Linux) | ||
|
|
||
| On Windows and Linux, `ToString` function of `SentryId` class now returns the sanitized string that doesn't contain dashes. | ||
|
|
||
| #### Global scope configuration | ||
|
|
||
| With the removal of `USentrySubsystem::ConfigureScope` global scope values (tags, context, attachments, etc.) should now be configured directly via the subsystem interface. | ||
|
Member
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. Can we have a code snippet as an example of what it used to be before and what has to be now?
Collaborator
Author
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. Added example for scope configuration in 7a0a6ca |
||
|
|
||
| ```cpp | ||
| USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>(); | ||
|
|
||
| // Configuring global scope before v1.0.0 | ||
|
|
||
| SentrySubsystem->ConfigureScope(FConfigureScopeNativeDelegate::CreateLambda([](USentryScope* Scope) | ||
| { | ||
| Scope->SetTag(...); | ||
| Scope->SetContext(...); | ||
| Scope->AddAttachment(...); | ||
| })); | ||
|
|
||
| // Configuring global scope in v1.0.0 | ||
|
|
||
| SentrySubsystem->SetTag(...); | ||
| SentrySubsystem->SetContext(...); | ||
| SentrySubsystem->AddAttachment(...); | ||
| ``` | ||
|
|
||
| ### Issue Grouping | ||
|
|
||
| The Unreal SDK no longer modifies call stacks for assertion events by trimming the topmost frames related to the engine's internal assertion handling logic. This was previously done to work around the case where all assertions were grouped into a single Sentry issue. With this change, issue grouping is now fully handled by the Sentry server. | ||
|
|
||
| ### SDK Configuration Changes | ||
|
|
||
| - The <PlatformIdentifier name="environment" /> and <PlatformIdentifier name="dist" /> properties must now be set in the plugin settings and can no longer be modified programmatically via scope configuration. | ||
|
|
||
| - Sentry can no longer be disabled for specific platforms using the `Enable for Build Platform Types` option in the plugin settings (`General -> Misc`) or the EnableTargetPlatforms property in the project configuration file. | ||
|
|
||
| - If upgrading from a version prior to 0.9.0 legacy settings `DsnUrl`, `EnableVerboseLogging` and `EnableStackTrace` will no longer be read from the project configuration file automatically. Instead, you must re-set them in plugin settings to adopt the new format. | ||
|
|
||
| - On mobile platforms, the default traces sampler will no longer be created automatically. You must now explicitly set the `Traces Sampler` property in the plugin settings to enable performance monitoring (`General -> Performance Monitoring`). | ||
|
|
||
| ### Crash Reporter Changes | ||
|
|
||
| The `Epic Account Id` and `Login Id` are no longer included in the `Crash Info` context for crashes captured on Windows and Linux using the default Crash Reporter. These fields are intended for internal use by Epic Games and provide no meaningful value externally. | ||
|
|
||
| ## Migrating to 0.19.0 | ||
|
|
||
| ### Breaking changes | ||
|
|
||
| - Renamed `OnError` delagate property of `FSentryOutputDeviceError` class to `OnAssert` | ||
|
|
||
| ## Migrating to 0.15.0 | ||
|
|
||
| ### Breaking changes | ||
|
|
||
| To enable capturing editor crashes `USentrySubsystem` base class has been changed to `UEngineSubsystem`. | ||
|
|
||
| - If you're using the plugin's Blueprint API, you will need to recreate all `Get Sentry Subsystem` nodes. | ||
| - If you're using the plugin's C++ API, update your implementation to access `USentrySubsystem` via the `GEngine` pointer. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a note on the eventId and associated id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It already mentions that event id is now optional and only message is required to create a new feedback. Do we need anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a matter of how descriptive do we want to be
Often the best way to read these docs, is to see an example of what you were writing, and what's the new way of doing the same thing.
Otherwise, you're left trying to understand the new API from scratch and doing the mapping in ur head
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added feedback submission example in 4e29a73