Synchronize `PropagationContext` across layers
Currently, WebViews, RN and native layers keep their own traceId. We could enhance the debugging experience by sharing trace across the hybrid applications layers.
Examples
- RN opens WebView and an error (Browser SDK in WebView captured an error) happens on the web due to RN not supplying needed data (error was capture by RN). These are not sharing the same trace as the SDK operate independently.
- Native SDK captures error, due to which data are missing in RN layer, and thus RN captures an error. Currently these errors are no covered by the same trace id.
### Tasks
- [ ] Pass trace from RN to native (if RN initialized first)
- [ ] React trace from native (if RN initialized second)
- [ ] Pass trace from RN to WebView
- [x] https://github.com/getsentry/sentry-java/pull/4137
- [x] https://github.com/getsentry/sentry-java/pull/4188
- [ ] https://github.com/getsentry/sentry-cocoa/pull/5081
Example of WebView Trace Sync from a demo project.
- https://github.com/krystofwoldrich/expo-dom-components/blob/main/lib/sentry/continueTrace.tsx
Hi :D, is there a way to inject the traceId in the span context even if Sentry.continueSpan doesn't yet exist in @sentry/react-native? I would love to have insight into any problem that might arise when my front-end receive a message from my message queue!
Thanks, have a very good day!
hi @noctisatrae thanks for the interest! We don't have an ETA yet, but it's in our backlog to provide an API for that @antonis fyi