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

Using React Native Navigation and Tabs cause spans being added to the wrong screen transaction #2285

Closed
marandaneto opened this issue Jun 15, 2022 · 6 comments · Fixed by #2932

Comments

@marandaneto
Copy link
Contributor

https://wix.github.io/react-native-navigation/docs/advanced-navigation/

this might be because there can only be one transaction on the scope at a time while there are multiple screens opening in a tabbed navigation.
A React-specific way of doing this would be to have a unique context for every screen to store the transactions.
And each span would attach to the most immediate parent in the component tree.

@bruno-garcia
Copy link
Member

This came up from a customer

@marandaneto
Copy link
Contributor Author

marandaneto commented Jun 24, 2022

@marandaneto
Copy link
Contributor Author

The way how the SDK works now would make it either very difficult or not possible.
Ideally, we'd store the transaction instances in a sort of Map<Screen, Transaction>, so every time when a new span is going to be added and we know to which screen it belongs, we could make the lookup and find the right transaction to attach to.

@marandaneto marandaneto moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Jun 24, 2022
@marandaneto
Copy link
Contributor Author

marandaneto commented Jun 24, 2022

Right now users could disable the auto instrumentation for those specific cases and use the custom instrumentation https://docs.sentry.io/platforms/react-native/performance/instrumentation/custom-instrumentation/

@github-actions
Copy link
Contributor

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

Is this still a bug? Are we going to change this in near future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants