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

chore(suite-native): make it simple to use Sentry locally in debug build #16356

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

matejkriz
Copy link
Member

Description

Turning on Sentry in the local debug build is now complicated and one has to rewrite several places. This PR tries to simplify it.

From now on it should be enough to switch EXPO_PUBLIC_IS_SENTRY_ENABLED in .env.development.local and do a prebuild.

@matejkriz matejkriz added sentry Reports linked from Sentry.io or Sentry enhancements mobile Suite Lite issues and PRs labels Jan 14, 2025
@@ -94,4 +93,4 @@ const PureApp = () => (
</GestureHandlerRootView>
);

export const App = isDebugEnv() ? PureApp : Sentry.wrap(PureApp);
export const App = Sentry.wrap(PureApp);
Copy link
Member Author

Choose a reason for hiding this comment

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

I know that we added that condition because of some warning during local development, but now I can't see that warning any more and I guess it is because I removed the condition for Sentry.init and just playing with the enabled property.

@matejkriz matejkriz marked this pull request as ready for review January 14, 2025 16:32
@matejkriz matejkriz requested a review from a team as a code owner January 14, 2025 16:32
@matejkriz matejkriz requested a review from Lemonexe January 14, 2025 16:33
@@ -1,2 +1,3 @@
EXPO_PUBLIC_ENVIRONMENT=debug
EXPO_PUBLIC_IS_ANALYTICS_LOGGER_ENABLED=false
EXPO_PUBLIC_IS_SENTRY_ENABLED=false
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to have it on for development build it helps catch lot of stuff that happens during QA etc. It was like that since beginning.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see it is confusing, but it still works like that, because the condition for enabling is enabled: !isDebugEnv() || process.env.EXPO_PUBLIC_IS_SENTRY_ENABLED === 'true',. I'll add comment here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm changing the name to EXPO_PUBLIC_IS_SENTRY_ON_DEBUG_BUILD_ENABLED instead of the comment to make it more clear.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 21
  • More info

Learn more about 𝝠 Expo Github Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Suite Lite issues and PRs sentry Reports linked from Sentry.io or Sentry enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants