Skip to content

RUM-16634: Add wildcard host pattern matching to WebViewTracking#3540

Draft
kikoveiga wants to merge 1 commit into
developfrom
kikoveiga/rum-16634/webview-host-patterns
Draft

RUM-16634: Add wildcard host pattern matching to WebViewTracking#3540
kikoveiga wants to merge 1 commit into
developfrom
kikoveiga/rum-16634/webview-host-patterns

Conversation

@kikoveiga

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Adds a new WebViewTracking.enableWithPatterns API that accepts wildcard host patterns (e.g., "*.example.com, "preview-*.shopist.io") in addition to plain hosts. Patterns are validated on our side and then transmitted to the Browser SDK through the existing getAllowedWebViewHosts() bridge.
  • Adds a HostPatternValidator to dd-sdk-android-core which handles validating and normalizing wildcard patterns. It lives in the core so the incoming first-party-hosts widlcard matching work can reuse it.

Motivation

Customers weren't able to easily enumerate hostnames loaded in a WebView such as ephemeral preview URLs, multi-tenant subdomains.

Additional Notes

iOS PR: DataDog/dd-sdk-ios#2963
Broswer PR: DataDog/browser-sdk#4703

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@kikoveiga kikoveiga requested review from a team as code owners June 12, 2026 16:15
@datadog-datadog-prod-us1-2

This comment has been minimized.

@kikoveiga kikoveiga marked this pull request as draft June 12, 2026 16:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3030c6a1ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codecov-commenter

codecov-commenter commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.43%. Comparing base (bc840ec) to head (ec19467).

Files with missing lines Patch % Lines
...lin/com/datadog/android/webview/WebViewTracking.kt 95.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3540      +/-   ##
===========================================
+ Coverage    72.40%   72.43%   +0.03%     
===========================================
  Files          967      968       +1     
  Lines        35717    35762      +45     
  Branches      5967     5970       +3     
===========================================
+ Hits         25858    25902      +44     
+ Misses        8200     8198       -2     
- Partials      1659     1662       +3     
Files with missing lines Coverage Δ
...android/core/configuration/HostPatternValidator.kt 100.00% <100.00%> (ø)
...dog/android/webview/internal/DatadogEventBridge.kt 100.00% <100.00%> (ø)
...lin/com/datadog/android/webview/WebViewTracking.kt 85.82% <95.00%> (+1.39%) ⬆️

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kikoveiga kikoveiga force-pushed the kikoveiga/rum-16634/webview-host-patterns branch 2 times, most recently from 3120dfd to 363dc08 Compare June 15, 2026 14:45
@kikoveiga kikoveiga force-pushed the kikoveiga/rum-16634/webview-host-patterns branch from 363dc08 to ec19467 Compare June 15, 2026 16:34
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.

2 participants