Repository navigation
docs(android): Document connecting WebView traces - #20550
Merged
Merged
Conversation
Replace the Android WebView guidance, which said the SDK doesn't interact with web views, with setup for SentryWebViewTracing. addTracePropagation, matching the Apple and React Native pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
codeowner-assignment
Bot
requested review from
a team,
romtsn and
runningcode
and removed request for
a team
November 5, 2026 11:19
Contributor
📸 ScreenshotsBefore = production (docs.sentry.io) · After = Vercel preview of 🟥 red = removed / replaced · 🟩 green = new / changed · dashed green = where new content is inserted Android › WebViewChecks
|
antonis
marked this pull request as ready for review
November 5, 2026 11:58
Contributor
|
Getting ready to monitor this change · Rollout details
|
This was referenced Nov 5, 2026
1 of 6 tasks
## DESCRIBE YOUR PR Documents setting the WebView allowed hosts once in the Android SDK options, added in getsentry/sentry-java#6516. Stacked on #20550. Adds a section to the Android WebView page covering `options.webViewTracing.allowedHosts`, the `io.sentry.webview-tracing.allowed-hosts` manifest entry, and `SentryWebViewTracing.addTracePropagation(webView)`. This is a draft until the SDK change is merged. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
approved these changes
Nov 17, 2026
runningcode
left a comment
Contributor
There was a problem hiding this comment.
Looks good! I added some small suggestions but I'm approving anyways!
|
|
||
| Use `SentryWebViewTracing.addTracePropagation` to inject your app's trace into an `android.webkit.WebView`. The Browser SDK running in the web page picks it up on pageload and continues the same trace, so the web page's pageload transaction and errors share the trace of your app. The result is a single connected trace across the native and web parts of the user journey. | ||
|
|
||
| Trace propagation uses the [AndroidX WebKit](https://developer.android.com/jetpack/androidx/releases/webkit) library, which the Android SDK doesn't add for you. Add it to your app: |
Contributor
There was a problem hiding this comment.
why don't we add it? what would be the downside there?
Contributor
Author
There was a problem hiding this comment.
I've kept it optional (compileOnly), like androidx.activity for the feedback form. My understanding is that bundling it would add it to every app. Happy to iterate on this if it makes sense.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w-trace-propagation
This branch was successfully deployed
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.




DESCRIBE YOUR PR
Documents connecting traces between an Android app and the web content in its
WebView, added to the Android SDK in getsentry/sentry-java#6395.This replaces the Android WebView page's statement that the SDK doesn't interact with web views. The new Connect Traces section covers:
SentryWebViewTracing.addTracePropagation, with Kotlin and Java examples;androidx.webkitdependency the app has to add;WebViewAssetLoader;The structure and wording follow the Apple (#20399) and React Native (#19659) WebView pages.
8.64.0should change if this lands sooner or laterResolves getsentry/sentry-java#6161
IS YOUR CHANGE URGENT?
PRE-MERGE CHECKLIST
🤖 Generated with Claude Code