Repository navigation
Conversation
Add SentryWebViewTracing.addTracePropagation(to:options:), which injects the current trace as sentry-trace and baggage meta tags into pages on allowed hosts before page scripts run, so @sentry/browser continues the trace on pageload. It accepts a WKUserContentController, WKWebViewConfiguration, WKWebView, or SwiftUI WebPage.Configuration (iOS 26+). SentryObjC exposes it as SentryObjCWebViewTracing. The injected script and host normalization match sentry-react-native and sentry-java. Using the API records the WebViewTracePropagation integration for adoption. Extract the outgoing trace lookup from the network tracker into SentryOutgoingTrace so both paths share it.
Run @sentry/browser in the iOS-Swift WebView screen so its pageload continues the app's trace, and add a SwiftUI WebPage screen on iOS 26. UI tests check that both pages see the injected trace before their own scripts run. Add a test that loads a page in a real WebPage created from a configuration with Sentry's script.
Move the lookup of the trace propagated to outgoing requests from SentryNetworkTracker into SentryOutgoingTrace: the span bound to the scope if it belongs to a tracer, otherwise the scope's propagation context. Behavior is unchanged. This lets WebView trace propagation reuse the same lookup.
Move SentryObjCWebViewTracing, its tests, and the SentryObjC API snapshots to a separate pull request stacked on this one, to keep this one focused on the Swift API.
Resolve the current hub once in addTracePropagation and pass it to both the adoption marker and the script install, and replace the test Hub double with real hubs. Keep SentrySDKWrapper.dsn internal: the sample pages read the DSN from SentrySDK.startOption instead. Merge the changelog entry into the existing Features section of Unreleased.
The SwiftPM package tests run on the iOS Simulator without a host app. There, WebKit's web content process intermittently becomes unresponsive, so the two WebView page-load tests time out. The Xcode unit test plans and the iOS-Swift UI tests keep covering real page loads.
The V9 distribution job is the only one still on GitHub-hosted macos-26 runners. There, the hostless WebView page-load tests time out because the web content process stops responding, while V10 on Bitrise loads the same pages in about a second. Move V9 to the tahoe pool and remove the WebView test skips from the SPM test plans. Refs #9524
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Moves the SPM V9 distribution job from the GitHub-hosted
macos-26runner to the Bitrisetahoepool, which V10 already uses (#9139). It also removes the skips for the two WebView page-load tests from the SPM test plans, so both plans matchmainagain.💡 Motivation and Context
In the SPM V9 job, the WebView page-load tests run without a host app on the hosted runner and time out. WebKit logs
WebProcessProxy::didBecomeUnresponsive, and a singleWebPagetest can take about 500 s. V10 runs the same tests on Bitrise and loads each page in about 1 s. #9474 skipped these tests in the SPM plans to unblock merging. This PR checks whether a less loaded runner fixes the problem, so the skips can go.A host app isn't an option here, because SwiftPM test targets always run without one.
Closes #9524
💚 How did you test it?
CI
📝 Checklist
sendDefaultPIIis enabled.#skip-changelog