Using React Native Navigation and Tabs cause spans being added to the wrong screen transaction
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.
This came up from a customer
Similar to https://github.com/getsentry/sentry-java/issues/2004 and https://github.com/getsentry/sentry-cocoa/issues/1768
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.
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/
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 🥀
Is this still a bug? Are we going to change this in near future?