Skip to content
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

Add flag indicating which package version is used (GitHub or Marketplace) #479

Merged
merged 10 commits into from
Jan 19, 2024

Conversation

tustanivsky
Copy link
Collaborator

This PR introduces the following changes:

  • IsMarketplace flag value is set in CI during the plugin packaging
  • IsMarketplace flag added to the default event's context
  • Updated sentry-native initialization logic
  • Fixed issue with permanently disabling crash reporter

@tustanivsky tustanivsky marked this pull request as ready for review January 10, 2024 14:03
Copy link
Contributor

github-actions bot commented Jan 10, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against a3eaed0

{
if(!FPaths::FileExists(GetHandlerPath()))
{
UE_LOG(LogSentrySdk, Log, TEXT("Crashpad executable couldn't be found so Breakpad will be used instead. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get how we fall back to Breakpad. Is that an implicit fallback during initialization due to a missing Crashpad executable? Because the non-existing path still gets set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We determine which backend sentry-native should be using by checking whether the crashpad_handler executable exists within the package during the plugin's build. If at some point user decides to switch to Breakpad simply deleting the crashpad_handler executable won't be enough and plugin rebuild will be required. In this case handler path will be ignored during the initialization and won't affect its result.

Comment on lines +143 to +145
FPlatformMisc::SetCrashHandlingType(settings->EnableAutoCrashCapturing
? ECrashHandlingType::Disabled
: ECrashHandlingType::Default);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fallback to still keep the built-in crash reporter functional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, without it we won't be able to restore normal crash reporter behavior within the same editor session even after disabling EnableAutoCrashCapturing in plugin's settings.

CHANGELOG.md Outdated Show resolved Hide resolved
@tustanivsky tustanivsky merged commit 409eb48 into main Jan 19, 2024
16 checks passed
@tustanivsky tustanivsky deleted the feat/marketplace-tag branch January 19, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants