-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Conversation
@@ -94,4 +93,4 @@ const PureApp = () => ( | |||
</GestureHandlerRootView> | |||
); | |||
|
|||
export const App = isDebugEnv() ? PureApp : Sentry.wrap(PureApp); | |||
export const App = Sentry.wrap(PureApp); |
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.
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.
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.
Thought:
When we enable EXPO_PUBLIC_IS_SENTRY_ON_DEBUG_BUILD_ENABLED
in .env, we wont see anywhere that it is active. Do we want handle someone forgetting to switch it off and spamming sentry from develop?
What about to log a warning, that sentry is enabled, so devs can notice better in such case? Wdyt? 🤔
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.
If you edit the ENV in git tracked file it's impossible to forget about. Worst case you accidentally commit it and CR catches it.
Do you have a non-git-tracked env file in suite-native? 🤔
If yes, then I'd add a comment here: # only modify it in *this file*, so you don't forget to turn it off
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.
.env.development.local
is not tracked in git and I think it's good to use it. I see no big harm in sending more events from debug build to sentry. It's super easy to filter them out in Sentry. If we start sending hundreds of thousands of events, than we can think about some optimization 😉
🚀 Expo preview is ready!
|
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.
LGTM, now it's nice and clear. Tested ✔️
/rebase |
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/12792735072 |
f98d859
to
2a51eb9
Compare
c44e15a
to
7c56d99
Compare
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.