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

android: re-installation of native backend #339

Merged
merged 10 commits into from
Sep 27, 2021

Conversation

bruno-garcia
Copy link
Member

@bruno-garcia bruno-garcia commented Sep 24, 2021

Android reinitialization of the sentry-native backend after C# init to compensate Unity taking the signal handler and not calling back into Sentry's one.

Additionally, other changes happened in the process that were hard to split into different PRs:

  • Adding breadcrumb level for Android (replacing fix: android crumb level #338)
  • Aligned behavior (mainly logging) between iOS and Android C# bridge
  • Moved any logic/complex code away from the SentryInitialization class since we don't get that to compile with the solution. There's now a single method to configure the native layer through C# and less code to document on the 'manual initialization'
  • Enabled NDK scope propagation by default (we can possibly add an opt-out in the future if this becomes an issue in terms of overhead)
  • Unit tests where possible
  • SendMessage button changed to a SentrySdk.CaptureMessage since Debug.Log only tracks breadcrumbs
  • Changed the CaptureExceptionToString which was used for testing the parsing code originally to a SetUser so we can have a sample of scope propagation: User set in C# should end up in errors in Cocoa, Java, C:

Example event in Sentry:

image

@bruno-garcia bruno-garcia requested a review from a team September 25, 2021 01:01
Copy link
Contributor

@bitsandfoxes bitsandfoxes left a comment

Choose a reason for hiding this comment

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

Thanks for the additional cleanup!

@bruno-garcia bruno-garcia merged commit d62e03b into main Sep 27, 2021
@bruno-garcia bruno-garcia deleted the fix/android-ndk-sentry-native branch September 27, 2021 12:42
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.

3 participants