⚗️ [RUM-13259] Add shadow DOM support for action selectors
Motivation
Second part of shadow DOM support for actions. This PR adds selector generation for elements inside shadow DOM, using a /shadow/ marker to indicate shadow boundaries.
Follows up on the first PR that added action name support.
Changes
- Generate selectors that cross shadow DOM boundaries with /shadow/ marker
- Added unit tests for shadow DOM selectors
- Added e2e tests for selector generation
These two pictures are coming from the same click with and without the parameter enabled. The selector is correct and more precise that's why the width and height are smaller.
Before
After
Selector query
Test instructions
Checklist
- [x] Tested locally
- [x] Tested on staging
- [ ] Added unit tests for this change.
- [ ] Added e2e/integration tests for this change.
Bundles Sizes Evolution
| 📦 Bundle Name | Base Size | Local Size | 𝚫 | 𝚫% | Status |
|---|---|---|---|---|---|
| Rum | 167.75 KiB | 168.00 KiB | +258 B | +0.15% | ✅ |
| Rum Profiler | 4.33 KiB | 4.33 KiB | 0 B | 0.00% | ✅ |
| Rum Recorder | 24.48 KiB | 24.48 KiB | 0 B | 0.00% | ✅ |
| Logs | 56.25 KiB | 56.25 KiB | 0 B | 0.00% | ✅ |
| Flagging | 944 B | 944 B | 0 B | 0.00% | ✅ |
| Rum Slim | 124.85 KiB | 125.10 KiB | +258 B | +0.20% | ✅ |
| Worker | 23.63 KiB | 23.63 KiB | 0 B | 0.00% | ✅ |
🚀 CPU Performance
| Action Name | Base CPU Time (ms) | Local CPU Time (ms) | 𝚫% |
|---|---|---|---|
| RUM - add global context | 0.0039 | 0.0041 | +5.13% |
| RUM - add action | 0.0152 | 0.0142 | -6.58% |
| RUM - add error | 0.0127 | 0.0162 | +27.56% |
| RUM - add timing | 0.0025 | 0.0031 | +24.00% |
| RUM - start view | 0.003 | 0.0032 | +6.67% |
| RUM - start/stop session replay recording | 0.0006 | 0.0007 | +16.67% |
| Logs - log message | 0.0139 | 0.0152 | +9.35% |
🧠 Memory Performance
| Action Name | Base Memory Consumption | Local Memory Consumption | 𝚫 |
|---|---|---|---|
| RUM - add global context | 26.67 KiB | 25.53 KiB | -1.14 KiB |
| RUM - add action | 49.57 KiB | 47.47 KiB | -2.10 KiB |
| RUM - add timing | 26.37 KiB | 26.51 KiB | +143 B |
| RUM - add error | 59.01 KiB | 52.24 KiB | -6.77 KiB |
| RUM - start/stop session replay recording | 27.10 KiB | 26.52 KiB | -598 B |
| RUM - start view | 429.08 KiB | 426.01 KiB | -3.07 KiB |
| Logs - log message | 49.59 KiB | 47.38 KiB | -2.20 KiB |
✅ Tests
🎉 All green!
❄️ No new flaky tests detected
🧪 All tests passed
🎯 Code Coverage
• Patch Coverage: 84.38%
• Overall Coverage: 77.35% (+0.02%)
View detailed report
🔗 Commit SHA: 72be44c | Docs | Datadog PR Page | Was this helpful? Give us feedback!
/to-staging
View all feedbacks in Devflow UI.
2026-01-26 12:39:42 UTC :information_source: Start processing command /to-staging
2026-01-26 12:39:50 UTC :information_source: Branch Integration: starting soon, merge expected in approximately 0s (p90)
Commit 72be44cef8 will soon be integrated into staging-05.
2026-01-26 12:59:44 UTC :information_source: Branch Integration: this commit was successfully integrated
Commit 72be44cef8 has been merged into staging-05 in merge commit 0debb8f7a3.
Check out the triggered pipeline on Gitlab 🦊
If you need to revert this integration, you can use the following command: /code revert-integration -b staging-05