Skip to content

feat: Sync scope from the webview to the Rust SDK - #45

Merged
timfish merged 2 commits into
masterfrom
tim/scope-sync
Oct 19, 2026
Merged

timfish merged 2 commits into
masterfrom
tim/scope-sync

Conversation

@timfish

@timfish timfish commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

A new ScopeToRust integration in the default browser options sends user, tags, extra and contexts to a new scope command whenever they change, so Rust panics and messages include what the app set with Sentry.setUser, setTag, setExtra and setContext in the webview. The integration sends only changed keys once per task, sends null for removed keys, and sends a null user after setUser(null), which clears the user in Rust; breadcrumbs still go only through the breadcrumb command. The command writes to Hub::main() and not the current thread hub, because other threads copy the main hub scope when they first use Sentry; threads that already have their own hub do not see later changes, which is a limit of sentry-rust. New e2e tests cover sync and async commands and setUser(null), and the native crash test is skipped because sentry-minidump 0.49.3 does not send the app scope to the crash reporter yet.

@timfish
timfish merged commit ab20b8e into master Oct 19, 2026
8 checks passed
@timfish
timfish deleted the tim/scope-sync branch November 4, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant