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

react-native adds wrap during setup #280

Open
Tracked by #71
smeubank opened this issue Jun 2, 2023 · 5 comments · May be fixed by #835
Open
Tracked by #71

react-native adds wrap during setup #280

smeubank opened this issue Jun 2, 2023 · 5 comments · May be fixed by #835

Comments

@smeubank
Copy link
Member

smeubank commented Jun 2, 2023

The wizard for react native already adds init instrumentation but it could also add the wrap around the App removing one more manual step for golden path users, and making the RN wizard a lil more magical 🧙 🪄

export default Sentry.wrap(App);

once this is done, we can remove the changes made in the product onboarding, and from the related docs.

getsentry/sentry#85935

@krystofwoldrich
Copy link
Member

krystofwoldrich commented Jun 16, 2023

Effort: Small
Impact: Medium

We don't have to cover all cases, let's regex the default RN Template case.

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@krystofwoldrich
Copy link
Member

This got stale but, we should prioritize this and get it done.

@krystofwoldrich
Copy link
Member

We should focus on automatically wrapping

  • Expo with ExpoRouter
    • wrap the default export of root app/_layout.tsx
  • and Bare RN with ReactNavigation
    • wrap the default export of App.tsx or AppRegistry.registerComponent in index.js (depending on what's more feasible programmatically)

https://docs.sentry.io/platforms/react-native/manual-setup/expo/#wrap-your-app

When the wizard can't find a component to wrap, for example, because the app is using React Native Navigation, we should show a code snippet so the user can wrap the correct component manually.

@antonis antonis self-assigned this Feb 27, 2025
@antonis antonis moved this from Todo to In Progress in Mobile & Cross Platform SDK Feb 28, 2025
@antonis antonis linked a pull request Feb 28, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

5 participants