Skip to content

[PANA-6072] add composedPathSelector to click actions target behind FF#4211

Open
LFBarreto wants to merge 2 commits intomainfrom
luiz.barreto/PANA-6072-action-mgmt-browser-sdk-po-c-for-event-path-selector-collection-update
Open

[PANA-6072] add composedPathSelector to click actions target behind FF#4211
LFBarreto wants to merge 2 commits intomainfrom
luiz.barreto/PANA-6072-action-mgmt-browser-sdk-po-c-for-event-path-selector-collection-update

Conversation

@LFBarreto
Copy link
Collaborator

@LFBarreto LFBarreto commented Feb 19, 2026

Motivation

PANA-6072

Changes

This adds a composedPath based selector string that will be used in Product Analytics action management.
For more info

  • The new field is added to @_dd.action.target.composed_path_selector, it is built by collecting id, attributes, classes and child position data (nth-child nth-of-type)
  • The composed string is truncated to a maximum of 2kb character length
  • The attributes collected are limited to a predefined allow list to avoid collecting PII data, this attribute list can be extended via the rum configuration allowedHtmlAttributes
  • 🚩The data is only collected for now if the experimentalFeatureFlag composed_path_selector is set in the config
Screenshot 2026-02-23 at 09 49 16

Test instructions

In the file sandbox/react-app/main.tsx, add to the configuration to enable the FF:

  enableExperimentalFeatures: ['composed_path_selector'],
})

check that click events now contain _dd.action.target.composed_path_selector

Screenshot 2026-02-24 at 11 46 54

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 19, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 174.03 KiB 175.56 KiB +1.52 KiB +0.87%
Rum Profiler 4.71 KiB 4.71 KiB 0 B 0.00%
Rum Recorder 24.88 KiB 24.88 KiB 0 B 0.00%
Logs 56.54 KiB 56.59 KiB +50 B +0.09%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 129.73 KiB 131.23 KiB +1.50 KiB +1.16%
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.0061 0.0053 -13.11%
RUM - add action 0.0195 0.0186 -4.62%
RUM - add error 0.0196 0.0167 -14.80%
RUM - add timing 0.0038 0.0031 -18.42%
RUM - start view 0.0182 0.0135 -25.82%
RUM - start/stop session replay recording 0.0012 0.0008 -33.33%
Logs - log message 0.0258 0.02 -22.48%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 26.22 KiB 27.28 KiB +1.06 KiB
RUM - add action 49.71 KiB 51.37 KiB +1.66 KiB
RUM - add timing 27.02 KiB 26.05 KiB -992 B
RUM - add error 55.97 KiB 54.58 KiB -1.39 KiB
RUM - start/stop session replay recording 25.50 KiB 25.78 KiB +283 B
RUM - start view 449.04 KiB 450.79 KiB +1.75 KiB
Logs - log message 44.26 KiB 44.61 KiB +362 B

🔗 RealWorld

@datadog-official
Copy link

datadog-official bot commented Feb 19, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 76.92%
Overall Coverage: 77.18% (-0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a21a1c5 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@LFBarreto LFBarreto force-pushed the luiz.barreto/PANA-6072-action-mgmt-browser-sdk-po-c-for-event-path-selector-collection-update branch from 0714581 to c892584 Compare February 19, 2026 16:39
@LFBarreto LFBarreto force-pushed the luiz.barreto/PANA-6072-action-mgmt-browser-sdk-po-c-for-event-path-selector-collection-update branch 4 times, most recently from f47e098 to d7aa56c Compare February 20, 2026 13:44
@LFBarreto LFBarreto changed the title [PANA-6072] PoC - add composedPathSelector to click actions target [PANA-6072] add composedPathSelector to click actions target behind FF Feb 23, 2026
@LFBarreto LFBarreto marked this pull request as ready for review February 23, 2026 09:02
@LFBarreto LFBarreto requested a review from a team as a code owner February 23, 2026 09:02
@LFBarreto LFBarreto force-pushed the luiz.barreto/PANA-6072-action-mgmt-browser-sdk-po-c-for-event-path-selector-collection-update branch 3 times, most recently from 422d1b4 to e2e5ce8 Compare February 24, 2026 10:37
@LFBarreto LFBarreto force-pushed the luiz.barreto/PANA-6072-action-mgmt-browser-sdk-po-c-for-event-path-selector-collection-update branch from e2e5ce8 to a21a1c5 Compare March 2, 2026 09:24
@thomas-lebeau
Copy link
Collaborator

@LFBarreto, if I understand the Jira ticket correctly, this is a POC to validate a technical direction. As such I'm gonna convert the PR as draft in order to help us better keep track of PR that are ready for review.

Feel free to reopen if this is a misunderstanding.

@thomas-lebeau thomas-lebeau marked this pull request as draft March 3, 2026 07:40
@LFBarreto
Copy link
Collaborator Author

LFBarreto commented Mar 3, 2026

@LFBarreto, if I understand the Jira ticket correctly, this is a POC to validate a technical direction. As such I'm gonna convert the PR as draft in order to help us better keep track of PR that are ready for review.

Feel free to reopen if this is a misunderstanding.

We tested this update on the sdk for the new added field for our use case on product analytics,
i'd like a validation/review from the browser-sdk team on that now.

I updated the ticket to make it clearer sorry for the confusion

@LFBarreto LFBarreto marked this pull request as ready for review March 3, 2026 10:23
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