getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.14k stars 430 forks source link

Sync User and Session data between Android/iOS SDKs and WebSDK #2934

Open JohannesPtaszyk opened 11 months ago

JohannesPtaszyk commented 11 months ago

Problem Statement

In our apps we are using WebViews to provide some features dynamically. As we are using Sentry in Web and App, we would love to be able to sync the user and session data between the Web and Native SDKs.

Solution Brainstorm

It would be awesome if Sentry would provide some kind of JS bridge or other way of syncing the data between the SDKs in WebViews.

┆Issue is synchronized with this Jira Improvement by Unito

markushi commented 11 months ago

Thanks for reaching out, that's an excellent idea! We'll look into this.

markushi commented 11 months ago

In a first step let's have a manual method, something like Sentry.setupWebView(webview: WebView) In a later step we could have automatic code-instrumentation to auto-inject this into every WebView.

JohannesPtaszyk commented 11 months ago

As I prefere manual setup over automatic magic, I am totally fine! Thank you!

micahnance commented 3 months ago

We at Tapcart are also interested in a feature along these lines. Our scenario is: