-
Notifications
You must be signed in to change notification settings - Fork 83
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
Example needed of use with expo-router #370
Comments
In expo router, there is no entry point App.js, so no way to wrap it with sentry. |
When adding |
@statico I am facing the same issue right now. I tried your solution in my app, but I'm getting this error
The difference I noticed between our setup is that I'm using SDK 49. Not sure if that is cause this error. |
@prathmeshgodse We upgraded to Expo v49, but I just checked and the code is the same. No issues here. Here's our package.json in case that helps:
|
Hey @statico, I made a small mistake. Moved your code snippet within the layout default export and now it works. Thanks for your reply! On a side note, were you able to enable profiling for your app? I have tried wrapping my components with This is my
|
Hello everyone, See the new documentation for Update to https://github.com/getsentry/sentry-react-native/releases/tag/5.16.0 or newer to get all the new features. Migration guides available: |
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem. |
Summary
If you're using sentry-expo, you might also be using expo-router since you're part of the Expo ecosystem.
Unfortunately, I had trouble getting this to work with expo-router and had to write my own solution. It looks like this, which I have in our top-level
_layout.tsx
component:Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
48
Environment
Also:
Reproducible demo or steps to reproduce from a blank project
npx expo install
the usual stuff includingsentry-expo
andexpo-router
enableInExpoDevelopment
anddebug
are trueintegrations: [new Sentry.Native.ReactNativeTracing({ ... })]
to the Sentry initroutingInstrumentation
andSentry.Native.ReactNavigationInstrumentation
You may experience the infinite loop in #368 — in which case, add
enableAppStartTracking: false
You'll find that the first route starts a transaction, but changing to any route doesn't start a transaction.
The text was updated successfully, but these errors were encountered: