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 4 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 Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.53%. Comparing base (dfc7ba1) to head (75388df).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3276      +/-   ##
==========================================
- Coverage   93.66%   93.53%   -0.14%     
==========================================
  Files         288      288              
  Lines        7598     7613      +15     
  Branches     1730     1736       +6     
==========================================
+ Hits         7117     7121       +4     
- Misses        481      492      +11     

☔ 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

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 144.56 KiB 144.94 KiB 386 B +0.26%
Logs 51.09 KiB 51.13 KiB 48 B +0.09%
Rum Slim 103.42 KiB 103.79 KiB 373 B +0.35%
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.003 0.001
addaction 0.071 0.082 0.011
addtiming 0.001 0.002 0.001
adderror 0.067 0.126 0.060
startstopsessionreplayrecording 0.011 0.016 0.005
startview 0.573 0.530 -0.043
logmessage 0.038 0.025 -0.012
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 28.38 KiB 27.00 KiB -1405 B
addaction 55.02 KiB 55.14 KiB 131 B
addtiming 26.34 KiB 26.39 KiB 49 B
adderror 60.44 KiB 62.28 KiB 1.83 KiB
startstopsessionreplayrecording 27.62 KiB 26.47 KiB -1179 B
startview 413.06 KiB 415.26 KiB 2.19 KiB
logmessage 60.26 KiB 60.94 KiB 696 B

🔗 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