Title: Automatic WebView trace propagation via the Gradle plugin · Issue #6407 · getsentry/sentry-java · GitHub
Open Graph Title: Automatic WebView trace propagation via the Gradle plugin · Issue #6407 · getsentry/sentry-java
X Title: Automatic WebView trace propagation via the Gradle plugin · Issue #6407 · getsentry/sentry-java
Description: Outcome Connect native traces with WebView content without a manual SentryWebViewTracing.addTracePropagation call per WebView, and with a fresh trace on each page load. Context #6395 adds SentryWebViewTracing.addTracePropagation(webView,...
Open Graph Description: Outcome Connect native traces with WebView content without a manual SentryWebViewTracing.addTracePropagation call per WebView, and with a fresh trace on each page load. Context #6395 adds SentryWeb...
X Description: Outcome Connect native traces with WebView content without a manual SentryWebViewTracing.addTracePropagation call per WebView, and with a fresh trace on each page load. Context #6395 adds SentryWeb...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/6407
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Automatic WebView trace propagation via the Gradle plugin","articleBody":"## Outcome\n\nConnect native traces with WebView content without a manual `SentryWebViewTracing.addTracePropagation` call per WebView, and with a fresh trace on each page load.\n\n## Context\n\ngetsentry/sentry-java#6395 adds `SentryWebViewTracing.addTracePropagation(webView, allowedHosts...)`, which has two limits:\n- the app must call it for each WebView;\n- the injected trace is a snapshot taken at call time, so later loads reuse it until the app calls it again.\n\n## Proposal\n\nAdd an opt-in `WEBVIEW` feature to the Sentry Android Gradle Plugin's `tracingInstrumentation.features`:\n- rewrite `WebView.loadUrl(...)` call sites to go through an internal hook in `sentry-android-core`, which installs the trace for the configured hosts right before the load;\n- add an app-wide allowed-hosts setting, e.g. `webViewAllowedHosts`, passed to the SDK through `SentryAndroidOptions`.\n\nThe bytecode work belongs in getsentry/sentry-android-gradle-plugin; the runtime hook belongs in this repo.\n\n## Open questions\n\n- **App-wide hosts.** v1 keeps `allowedHosts` per WebView on purpose, because it is a trust boundary. Is an app-wide list acceptable? Needs Security input (SEC-1935).\n- **Navigations inside the page.** Links followed inside the page don't go through `loadUrl`, so they would keep the last trace. Is that acceptable, or should we also hook `WebViewClient` callbacks?\n- **Libraries.** Should WebViews created inside libraries be covered? That depends on the plugin instrumenting dependencies.\n\n## References\n\n- getsentry/sentry-java#6024 (v1)\n- getsentry/sentry-java#6395 (v1 implementation)\n- JAVA-716 (design)\n","author":{"url":"https://github.com/antonis","@type":"Person","name":"antonis"},"datePublished":"2026-10-28T10:00:11Z","url":"https://github.com/getsentry/sentry-java/issues/6407"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:849b251f-ef5f-78a4-12ce-8d2e8e683727 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF2C:15A4DC:206F456:2BB681C:6B0451A1 |
| html-safe-nonce | dd406427e6d17fd3c37733f57b84fc816523827ae8dc38e47a01a753d6749311 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjJDOjE1QTREQzoyMDZGNDU2OjJCQjY4MUM6NkIwNDUxQTEiLCJ2aXNpdG9yX2lkIjoiMjkyMTAwNTA5OTQzNjQ5NTI2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 97a9f865926561b746a065abc238f3484a720a7486046463bbbc3c778bd7962c |
| hovercard-subject-tag | issue:6076663892 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/6407/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a542ec9d7950a7caa5d0511d23f246c32de7e281d095f25459d0505b8ac2ac8/getsentry/sentry-java/issues/6407 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a542ec9d7950a7caa5d0511d23f246c32de7e281d095f25459d0505b8ac2ac8/getsentry/sentry-java/issues/6407 |
| og:image:alt | Outcome Connect native traces with WebView content without a manual SentryWebViewTracing.addTracePropagation call per WebView, and with a fresh trace on each page load. Context #6395 adds SentryWeb... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | antonis |
| hostname | github.com |
| expected-hostname | github.com |
| None | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width