Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚗ [RUM-7213] DOM mutation ignoring #3276

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jordan-th
Copy link

@jordan-th jordan-th commented Jan 11, 2025

Motivation

Ability to exclude certain DOM mutations from affecting the page loading time calculation

Changes

  • attributes mutations are ignored if the element has the attribute dd-ignore-mutations
  • childList and characterData mutations are ignored if the parent element has the attribute dd-ignore-mutations

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@bits-bot
Copy link

bits-bot commented Jan 11, 2025

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.79%. Comparing base (0de2a8e) to head (08ecd5b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3276      +/-   ##
==========================================
+ Coverage   92.75%   92.79%   +0.03%     
==========================================
  Files         299      299              
  Lines        7855     7870      +15     
  Branches     1793     1799       +6     
==========================================
+ Hits         7286     7303      +17     
+ Misses        569      567       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

function domMutationSpec(
mutate: (root: HTMLElement) => void,
{ expectedMutations }: { expectedMutations: number },
isRootMutationsIgnored?: boolean
Copy link
Author

Choose a reason for hiding this comment

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

This parameter allows us to test the case where the experimental feature is enabled and the IGNORE_MUTATIONS_ATTRIBUTE is not present.

If you think it would be useful, I am also open to adding tests for the case where the experimental feature is not enabled and the IGNORE_MUTATIONS_ATTRIBUTE is present

Copy link

cit-pr-commenter bot commented Jan 13, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 148.10 KiB 148.48 KiB 386 B +0.25%
Logs 52.26 KiB 52.30 KiB 48 B +0.09%
Rum Slim 106.77 KiB 107.13 KiB 373 B +0.34%
Worker 24.50 KiB 24.50 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.002 0.002 0.000
addaction 0.051 0.042 -0.009
addtiming 0.001 0.001 -0.000
adderror 0.109 0.065 -0.044
startstopsessionreplayrecording 0.013 0.012 -0.000
startview 0.517 0.445 -0.072
logmessage 0.040 0.023 -0.017
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 28.37 KiB 29.30 KiB 947 B
addaction 54.15 KiB 56.09 KiB 1.93 KiB
addtiming 27.77 KiB 27.91 KiB 139 B
adderror 60.10 KiB 61.73 KiB 1.63 KiB
startstopsessionreplayrecording 26.75 KiB 25.74 KiB -1029 B
startview 423.95 KiB 424.77 KiB 834 B
logmessage 60.08 KiB 62.75 KiB 2.67 KiB

🔗 RealWorld

@jordan-th
Copy link
Author

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Jan 13, 2025

Devflow running: /to-staging

View all feedbacks in Devflow UI.


2025-01-13 18:14:12 UTC ℹ️ Branch Integration: starting soon, median merge time is 0s

Commit 75388df806 will soon be integrated into staging-03.


2025-01-13 18:25:08 UTC ℹ️ Branch Integration: This commit was successfully integrated

Commit 75388df806 has been merged into staging-03 in merge commit 07047d13b3.

Check out the triggered pipeline on Gitlab 🦊

dd-mergequeue bot added a commit that referenced this pull request Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants